diff --git a/simulator/clusterresourceimporter/importer_test.go b/simulator/clusterresourceimporter/importer_test.go index 2b636354e..dfb59900d 100644 --- a/simulator/clusterresourceimporter/importer_test.go +++ b/simulator/clusterresourceimporter/importer_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/golang/mock/gomock" + "go.uber.org/mock/gomock" "golang.org/x/xerrors" m "sigs.k8s.io/kube-scheduler-simulator/simulator/clusterresourceimporter/mock_clusterresourceimporter" diff --git a/simulator/clusterresourceimporter/mock_clusterresourceimporter/replicate.go b/simulator/clusterresourceimporter/mock_clusterresourceimporter/replicate.go index 7ef441397..0e3dcb059 100644 --- a/simulator/clusterresourceimporter/mock_clusterresourceimporter/replicate.go +++ b/simulator/clusterresourceimporter/mock_clusterresourceimporter/replicate.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: sigs.k8s.io/kube-scheduler-simulator/simulator/clusterresourceimporter (interfaces: ReplicateService) +// +// Generated by this command: +// +// mockgen -destination=./mock_clusterresourceimporter/replicate.go . ReplicateService +// // Package mock_clusterresourceimporter is a generated GoMock package. package mock_clusterresourceimporter @@ -8,8 +13,7 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" - + gomock "go.uber.org/mock/gomock" snapshot "sigs.k8s.io/kube-scheduler-simulator/simulator/snapshot" ) @@ -17,6 +21,7 @@ import ( type MockReplicateService struct { ctrl *gomock.Controller recorder *MockReplicateServiceMockRecorder + isgomock struct{} } // MockReplicateServiceMockRecorder is the mock recorder for MockReplicateService. @@ -65,10 +70,10 @@ func (mr *MockReplicateServiceMockRecorder) IgnoreSchedulerConfiguration() *gomo } // Load mocks base method. -func (m *MockReplicateService) Load(arg0 context.Context, arg1 *snapshot.ResourcesForLoad, arg2 ...snapshot.Option) error { +func (m *MockReplicateService) Load(ctx context.Context, resources *snapshot.ResourcesForLoad, opts ...snapshot.Option) error { m.ctrl.T.Helper() - varargs := []interface{}{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, resources} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "Load", varargs...) @@ -77,17 +82,17 @@ func (m *MockReplicateService) Load(arg0 context.Context, arg1 *snapshot.Resourc } // Load indicates an expected call of Load. -func (mr *MockReplicateServiceMockRecorder) Load(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { +func (mr *MockReplicateServiceMockRecorder) Load(ctx, resources any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{arg0, arg1}, arg2...) + varargs := append([]any{ctx, resources}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Load", reflect.TypeOf((*MockReplicateService)(nil).Load), varargs...) } // Snap mocks base method. -func (m *MockReplicateService) Snap(arg0 context.Context, arg1 ...snapshot.Option) (*snapshot.ResourcesForSnap, error) { +func (m *MockReplicateService) Snap(ctx context.Context, opts ...snapshot.Option) (*snapshot.ResourcesForSnap, error) { m.ctrl.T.Helper() - varargs := []interface{}{arg0} - for _, a := range arg1 { + varargs := []any{ctx} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "Snap", varargs...) @@ -97,8 +102,8 @@ func (m *MockReplicateService) Snap(arg0 context.Context, arg1 ...snapshot.Optio } // Snap indicates an expected call of Snap. -func (mr *MockReplicateServiceMockRecorder) Snap(arg0 interface{}, arg1 ...interface{}) *gomock.Call { +func (mr *MockReplicateServiceMockRecorder) Snap(ctx any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{arg0}, arg1...) + varargs := append([]any{ctx}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Snap", reflect.TypeOf((*MockReplicateService)(nil).Snap), varargs...) } diff --git a/simulator/resourcewatcher/eventproxy_test.go b/simulator/resourcewatcher/eventproxy_test.go index 1adc07456..036e60176 100644 --- a/simulator/resourcewatcher/eventproxy_test.go +++ b/simulator/resourcewatcher/eventproxy_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" + "go.uber.org/mock/gomock" "golang.org/x/xerrors" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/simulator/resourcewatcher/mock_eventproxy_test.go b/simulator/resourcewatcher/mock_eventproxy_test.go index bd9d6688c..daceb619c 100644 --- a/simulator/resourcewatcher/mock_eventproxy_test.go +++ b/simulator/resourcewatcher/mock_eventproxy_test.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: eventproxy.go +// +// Generated by this command: +// +// mockgen -source=eventproxy.go -destination=./mock_eventproxy_test.go -package=resourcewatcher +// // Package resourcewatcher is a generated GoMock package. package resourcewatcher @@ -7,10 +12,9 @@ package resourcewatcher import ( reflect "reflect" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" watch "k8s.io/apimachinery/pkg/watch" cache "k8s.io/client-go/tools/cache" - streamwriter "sigs.k8s.io/kube-scheduler-simulator/simulator/resourcewatcher/streamwriter" ) @@ -18,6 +22,7 @@ import ( type MockeventProxyer struct { ctrl *gomock.Controller recorder *MockeventProxyerMockRecorder + isgomock struct{} } // MockeventProxyerMockRecorder is the mock recorder for MockeventProxyer. @@ -60,7 +65,7 @@ func (m *MockeventProxyer) listAndHandleItems(lw cache.Lister) error { } // listAndHandleItems indicates an expected call of listAndHandleItems. -func (mr *MockeventProxyerMockRecorder) listAndHandleItems(lw interface{}) *gomock.Call { +func (mr *MockeventProxyerMockRecorder) listAndHandleItems(lw any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "listAndHandleItems", reflect.TypeOf((*MockeventProxyer)(nil).listAndHandleItems), lw) } @@ -100,7 +105,7 @@ func (m *MockeventProxyer) watchAndHandleEvent(watcher watch.Interface, stopCh < } // watchAndHandleEvent indicates an expected call of watchAndHandleEvent. -func (mr *MockeventProxyerMockRecorder) watchAndHandleEvent(watcher, stopCh interface{}) *gomock.Call { +func (mr *MockeventProxyerMockRecorder) watchAndHandleEvent(watcher, stopCh any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "watchAndHandleEvent", reflect.TypeOf((*MockeventProxyer)(nil).watchAndHandleEvent), watcher, stopCh) } diff --git a/simulator/resourcewatcher/mock_resourcewatcher/lister.go b/simulator/resourcewatcher/mock_resourcewatcher/lister.go index 34fb1821d..cc60f4a82 100644 --- a/simulator/resourcewatcher/mock_resourcewatcher/lister.go +++ b/simulator/resourcewatcher/mock_resourcewatcher/lister.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: k8s.io/client-go/tools/cache (interfaces: Lister) +// +// Generated by this command: +// +// mockgen -destination=./mock_resourcewatcher/lister.go -package=mock_resourcewatcher -mock_names Interface=MockListerInterface k8s.io/client-go/tools/cache Lister +// // Package mock_resourcewatcher is a generated GoMock package. package mock_resourcewatcher @@ -7,7 +12,7 @@ package mock_resourcewatcher import ( reflect "reflect" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -16,6 +21,7 @@ import ( type MockLister struct { ctrl *gomock.Controller recorder *MockListerMockRecorder + isgomock struct{} } // MockListerMockRecorder is the mock recorder for MockLister. @@ -36,16 +42,16 @@ func (m *MockLister) EXPECT() *MockListerMockRecorder { } // List mocks base method. -func (m *MockLister) List(arg0 v1.ListOptions) (runtime.Object, error) { +func (m *MockLister) List(options v1.ListOptions) (runtime.Object, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "List", arg0) + ret := m.ctrl.Call(m, "List", options) ret0, _ := ret[0].(runtime.Object) ret1, _ := ret[1].(error) return ret0, ret1 } // List indicates an expected call of List. -func (mr *MockListerMockRecorder) List(arg0 interface{}) *gomock.Call { +func (mr *MockListerMockRecorder) List(options any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockLister)(nil).List), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockLister)(nil).List), options) } diff --git a/simulator/resourcewatcher/mock_resourcewatcher/streamWriter.go b/simulator/resourcewatcher/mock_resourcewatcher/streamWriter.go index a39c8e5a0..dfb4980b0 100644 --- a/simulator/resourcewatcher/mock_resourcewatcher/streamWriter.go +++ b/simulator/resourcewatcher/mock_resourcewatcher/streamWriter.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: sigs.k8s.io/kube-scheduler-simulator/simulator/resourcewatcher (interfaces: StreamWriter) +// +// Generated by this command: +// +// mockgen -destination=./mock_resourcewatcher/streamWriter.go . StreamWriter +// // Package mock_resourcewatcher is a generated GoMock package. package mock_resourcewatcher @@ -7,8 +12,7 @@ package mock_resourcewatcher import ( reflect "reflect" - gomock "github.com/golang/mock/gomock" - + gomock "go.uber.org/mock/gomock" streamwriter "sigs.k8s.io/kube-scheduler-simulator/simulator/resourcewatcher/streamwriter" ) @@ -16,6 +20,7 @@ import ( type MockStreamWriter struct { ctrl *gomock.Controller recorder *MockStreamWriterMockRecorder + isgomock struct{} } // MockStreamWriterMockRecorder is the mock recorder for MockStreamWriter. @@ -36,15 +41,15 @@ func (m *MockStreamWriter) EXPECT() *MockStreamWriterMockRecorder { } // Write mocks base method. -func (m *MockStreamWriter) Write(arg0 *streamwriter.WatchEvent) error { +func (m *MockStreamWriter) Write(we *streamwriter.WatchEvent) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Write", arg0) + ret := m.ctrl.Call(m, "Write", we) ret0, _ := ret[0].(error) return ret0 } // Write indicates an expected call of Write. -func (mr *MockStreamWriterMockRecorder) Write(arg0 interface{}) *gomock.Call { +func (mr *MockStreamWriterMockRecorder) Write(we any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockStreamWriter)(nil).Write), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockStreamWriter)(nil).Write), we) } diff --git a/simulator/resourcewatcher/mock_resourcewatcher/watchInterface.go b/simulator/resourcewatcher/mock_resourcewatcher/watchInterface.go index 6b72553ee..d6a286fc7 100644 --- a/simulator/resourcewatcher/mock_resourcewatcher/watchInterface.go +++ b/simulator/resourcewatcher/mock_resourcewatcher/watchInterface.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: k8s.io/apimachinery/pkg/watch (interfaces: Interface) +// +// Generated by this command: +// +// mockgen -destination=./mock_resourcewatcher/watchInterface.go -package=mock_resourcewatcher -mock_names Interface=MockWatchInterface k8s.io/apimachinery/pkg/watch Interface +// // Package mock_resourcewatcher is a generated GoMock package. package mock_resourcewatcher @@ -7,7 +12,7 @@ package mock_resourcewatcher import ( reflect "reflect" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" watch "k8s.io/apimachinery/pkg/watch" ) @@ -15,6 +20,7 @@ import ( type MockWatchInterface struct { ctrl *gomock.Controller recorder *MockWatchInterfaceMockRecorder + isgomock struct{} } // MockWatchInterfaceMockRecorder is the mock recorder for MockWatchInterface. diff --git a/simulator/resourcewatcher/resourcewatcher_test.go b/simulator/resourcewatcher/resourcewatcher_test.go index d742024b9..6988a748b 100644 --- a/simulator/resourcewatcher/resourcewatcher_test.go +++ b/simulator/resourcewatcher/resourcewatcher_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/golang/mock/gomock" + "go.uber.org/mock/gomock" "golang.org/x/xerrors" corev1 "k8s.io/api/core/v1" "k8s.io/client-go/kubernetes/fake" diff --git a/simulator/resourcewatcher/streamwriter/mock_streamwriter/responseStream.go b/simulator/resourcewatcher/streamwriter/mock_streamwriter/responseStream.go index 709ef174f..b08b70fb4 100644 --- a/simulator/resourcewatcher/streamwriter/mock_streamwriter/responseStream.go +++ b/simulator/resourcewatcher/streamwriter/mock_streamwriter/responseStream.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: sigs.k8s.io/kube-scheduler-simulator/simulator/resourcewatcher/streamwriter (interfaces: ResponseStream) +// +// Generated by this command: +// +// mockgen -destination=./mock_streamwriter/responseStream.go . ResponseStream +// // Package mock_streamwriter is a generated GoMock package. package mock_streamwriter @@ -7,13 +12,14 @@ package mock_streamwriter import ( reflect "reflect" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockResponseStream is a mock of ResponseStream interface. type MockResponseStream struct { ctrl *gomock.Controller recorder *MockResponseStreamMockRecorder + isgomock struct{} } // MockResponseStreamMockRecorder is the mock recorder for MockResponseStream. @@ -46,16 +52,16 @@ func (mr *MockResponseStreamMockRecorder) Flush() *gomock.Call { } // Write mocks base method. -func (m *MockResponseStream) Write(arg0 []byte) (int, error) { +func (m *MockResponseStream) Write(p []byte) (int, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Write", arg0) + ret := m.ctrl.Call(m, "Write", p) ret0, _ := ret[0].(int) ret1, _ := ret[1].(error) return ret0, ret1 } // Write indicates an expected call of Write. -func (mr *MockResponseStreamMockRecorder) Write(arg0 interface{}) *gomock.Call { +func (mr *MockResponseStreamMockRecorder) Write(p any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockResponseStream)(nil).Write), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockResponseStream)(nil).Write), p) } diff --git a/simulator/resourcewatcher/streamwriter/streamwriter_test.go b/simulator/resourcewatcher/streamwriter/streamwriter_test.go index 9fe4ee648..a89eb4cdf 100644 --- a/simulator/resourcewatcher/streamwriter/streamwriter_test.go +++ b/simulator/resourcewatcher/streamwriter/streamwriter_test.go @@ -3,7 +3,7 @@ package streamwriter import ( "testing" - "github.com/golang/mock/gomock" + "go.uber.org/mock/gomock" "golang.org/x/xerrors" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/simulator/scheduler/extender/mock_extender/extender.go b/simulator/scheduler/extender/mock_extender/extender.go index 3688d48f1..0d3530e92 100644 --- a/simulator/scheduler/extender/mock_extender/extender.go +++ b/simulator/scheduler/extender/mock_extender/extender.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: sigs.k8s.io/kube-scheduler-simulator/simulator/scheduler/extender (interfaces: Extender) +// +// Generated by this command: +// +// mockgen -destination=./mock_extender/extender.go . Extender +// // Package mock_extender is a generated GoMock package. package mock_extender @@ -7,7 +12,7 @@ package mock_extender import ( reflect "reflect" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" v1 "k8s.io/kube-scheduler/extender/v1" ) @@ -15,6 +20,7 @@ import ( type MockExtender struct { ctrl *gomock.Controller recorder *MockExtenderMockRecorder + isgomock struct{} } // MockExtenderMockRecorder is the mock recorder for MockExtender. @@ -35,33 +41,33 @@ func (m *MockExtender) EXPECT() *MockExtenderMockRecorder { } // Bind mocks base method. -func (m *MockExtender) Bind(arg0 v1.ExtenderBindingArgs) (*v1.ExtenderBindingResult, error) { +func (m *MockExtender) Bind(args v1.ExtenderBindingArgs) (*v1.ExtenderBindingResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Bind", arg0) + ret := m.ctrl.Call(m, "Bind", args) ret0, _ := ret[0].(*v1.ExtenderBindingResult) ret1, _ := ret[1].(error) return ret0, ret1 } // Bind indicates an expected call of Bind. -func (mr *MockExtenderMockRecorder) Bind(arg0 interface{}) *gomock.Call { +func (mr *MockExtenderMockRecorder) Bind(args any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bind", reflect.TypeOf((*MockExtender)(nil).Bind), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bind", reflect.TypeOf((*MockExtender)(nil).Bind), args) } // Filter mocks base method. -func (m *MockExtender) Filter(arg0 v1.ExtenderArgs) (*v1.ExtenderFilterResult, error) { +func (m *MockExtender) Filter(args v1.ExtenderArgs) (*v1.ExtenderFilterResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Filter", arg0) + ret := m.ctrl.Call(m, "Filter", args) ret0, _ := ret[0].(*v1.ExtenderFilterResult) ret1, _ := ret[1].(error) return ret0, ret1 } // Filter indicates an expected call of Filter. -func (mr *MockExtenderMockRecorder) Filter(arg0 interface{}) *gomock.Call { +func (mr *MockExtenderMockRecorder) Filter(args any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockExtender)(nil).Filter), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockExtender)(nil).Filter), args) } // Name mocks base method. @@ -79,31 +85,31 @@ func (mr *MockExtenderMockRecorder) Name() *gomock.Call { } // Preempt mocks base method. -func (m *MockExtender) Preempt(arg0 v1.ExtenderPreemptionArgs) (*v1.ExtenderPreemptionResult, error) { +func (m *MockExtender) Preempt(args v1.ExtenderPreemptionArgs) (*v1.ExtenderPreemptionResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Preempt", arg0) + ret := m.ctrl.Call(m, "Preempt", args) ret0, _ := ret[0].(*v1.ExtenderPreemptionResult) ret1, _ := ret[1].(error) return ret0, ret1 } // Preempt indicates an expected call of Preempt. -func (mr *MockExtenderMockRecorder) Preempt(arg0 interface{}) *gomock.Call { +func (mr *MockExtenderMockRecorder) Preempt(args any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Preempt", reflect.TypeOf((*MockExtender)(nil).Preempt), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Preempt", reflect.TypeOf((*MockExtender)(nil).Preempt), args) } // Prioritize mocks base method. -func (m *MockExtender) Prioritize(arg0 v1.ExtenderArgs) (*v1.HostPriorityList, error) { +func (m *MockExtender) Prioritize(args v1.ExtenderArgs) (*v1.HostPriorityList, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Prioritize", arg0) + ret := m.ctrl.Call(m, "Prioritize", args) ret0, _ := ret[0].(*v1.HostPriorityList) ret1, _ := ret[1].(error) return ret0, ret1 } // Prioritize indicates an expected call of Prioritize. -func (mr *MockExtenderMockRecorder) Prioritize(arg0 interface{}) *gomock.Call { +func (mr *MockExtenderMockRecorder) Prioritize(args any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Prioritize", reflect.TypeOf((*MockExtender)(nil).Prioritize), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Prioritize", reflect.TypeOf((*MockExtender)(nil).Prioritize), args) } diff --git a/simulator/scheduler/extender/mock_extender/resultstore.go b/simulator/scheduler/extender/mock_extender/resultstore.go index 9a17d9cf0..f90a31c0e 100644 --- a/simulator/scheduler/extender/mock_extender/resultstore.go +++ b/simulator/scheduler/extender/mock_extender/resultstore.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: ./resultstore/resultstore.go +// +// Generated by this command: +// +// mockgen -package=mock_extender -source=./resultstore/resultstore.go -destination=./mock_extender/resultstore.go +// // Package mock_extender is a generated GoMock package. package mock_extender @@ -7,7 +12,7 @@ package mock_extender import ( reflect "reflect" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" v1 "k8s.io/api/core/v1" v10 "k8s.io/kube-scheduler/extender/v1" ) @@ -16,6 +21,7 @@ import ( type MockStore struct { ctrl *gomock.Controller recorder *MockStoreMockRecorder + isgomock struct{} } // MockStoreMockRecorder is the mock recorder for MockStore. @@ -42,7 +48,7 @@ func (m *MockStore) AddBindResult(args v10.ExtenderBindingArgs, result v10.Exten } // AddBindResult indicates an expected call of AddBindResult. -func (mr *MockStoreMockRecorder) AddBindResult(args, result, hostName interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) AddBindResult(args, result, hostName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddBindResult", reflect.TypeOf((*MockStore)(nil).AddBindResult), args, result, hostName) } @@ -54,7 +60,7 @@ func (m *MockStore) AddFilterResult(args v10.ExtenderArgs, result v10.ExtenderFi } // AddFilterResult indicates an expected call of AddFilterResult. -func (mr *MockStoreMockRecorder) AddFilterResult(args, result, hostName interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) AddFilterResult(args, result, hostName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddFilterResult", reflect.TypeOf((*MockStore)(nil).AddFilterResult), args, result, hostName) } @@ -66,7 +72,7 @@ func (m *MockStore) AddPreemptResult(args v10.ExtenderPreemptionArgs, result v10 } // AddPreemptResult indicates an expected call of AddPreemptResult. -func (mr *MockStoreMockRecorder) AddPreemptResult(args, result, hostName interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) AddPreemptResult(args, result, hostName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPreemptResult", reflect.TypeOf((*MockStore)(nil).AddPreemptResult), args, result, hostName) } @@ -78,7 +84,7 @@ func (m *MockStore) AddPrioritizeResult(args v10.ExtenderArgs, result v10.HostPr } // AddPrioritizeResult indicates an expected call of AddPrioritizeResult. -func (mr *MockStoreMockRecorder) AddPrioritizeResult(args, result, hostName interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) AddPrioritizeResult(args, result, hostName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPrioritizeResult", reflect.TypeOf((*MockStore)(nil).AddPrioritizeResult), args, result, hostName) } @@ -90,7 +96,7 @@ func (m *MockStore) DeleteData(pod v1.Pod) { } // DeleteData indicates an expected call of DeleteData. -func (mr *MockStoreMockRecorder) DeleteData(pod interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) DeleteData(pod any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteData", reflect.TypeOf((*MockStore)(nil).DeleteData), pod) } @@ -104,7 +110,7 @@ func (m *MockStore) GetStoredResult(pod *v1.Pod) map[string]string { } // GetStoredResult indicates an expected call of GetStoredResult. -func (mr *MockStoreMockRecorder) GetStoredResult(pod interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) GetStoredResult(pod any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoredResult", reflect.TypeOf((*MockStore)(nil).GetStoredResult), pod) } diff --git a/simulator/scheduler/extender/service_test.go b/simulator/scheduler/extender/service_test.go index 6085e921f..c61cfa9ae 100644 --- a/simulator/scheduler/extender/service_test.go +++ b/simulator/scheduler/extender/service_test.go @@ -4,8 +4,8 @@ import ( "strconv" "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" + "go.uber.org/mock/gomock" "golang.org/x/xerrors" "k8s.io/client-go/kubernetes/fake" configv1 "k8s.io/kube-scheduler/config/v1" diff --git a/simulator/scheduler/plugin/mock/framework.go b/simulator/scheduler/plugin/mock/framework.go index 264359847..619678de3 100644 --- a/simulator/scheduler/plugin/mock/framework.go +++ b/simulator/scheduler/plugin/mock/framework.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: k8s.io/kubernetes/pkg/scheduler/framework (interfaces: PreFilterPlugin,FilterPlugin,PostFilterPlugin,PreScorePlugin,ScorePlugin,ScoreExtensions,PermitPlugin,BindPlugin,PreBindPlugin,PostBindPlugin,ReservePlugin) +// +// Generated by this command: +// +// mockgen -destination=./mock/framework.go -package=plugin k8s.io/kubernetes/pkg/scheduler/framework PreFilterPlugin,FilterPlugin,PostFilterPlugin,PreScorePlugin,ScorePlugin,ScoreExtensions,PermitPlugin,BindPlugin,PreBindPlugin,PostBindPlugin,ReservePlugin +// // Package plugin is a generated GoMock package. package plugin @@ -9,7 +14,7 @@ import ( reflect "reflect" time "time" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" v1 "k8s.io/api/core/v1" framework "k8s.io/kubernetes/pkg/scheduler/framework" ) @@ -18,6 +23,7 @@ import ( type MockPreFilterPlugin struct { ctrl *gomock.Controller recorder *MockPreFilterPluginMockRecorder + isgomock struct{} } // MockPreFilterPluginMockRecorder is the mock recorder for MockPreFilterPlugin. @@ -52,18 +58,18 @@ func (mr *MockPreFilterPluginMockRecorder) Name() *gomock.Call { } // PreFilter mocks base method. -func (m *MockPreFilterPlugin) PreFilter(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod) (*framework.PreFilterResult, *framework.Status) { +func (m *MockPreFilterPlugin) PreFilter(ctx context.Context, state *framework.CycleState, p *v1.Pod) (*framework.PreFilterResult, *framework.Status) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "PreFilter", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "PreFilter", ctx, state, p) ret0, _ := ret[0].(*framework.PreFilterResult) ret1, _ := ret[1].(*framework.Status) return ret0, ret1 } // PreFilter indicates an expected call of PreFilter. -func (mr *MockPreFilterPluginMockRecorder) PreFilter(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockPreFilterPluginMockRecorder) PreFilter(ctx, state, p any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PreFilter", reflect.TypeOf((*MockPreFilterPlugin)(nil).PreFilter), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PreFilter", reflect.TypeOf((*MockPreFilterPlugin)(nil).PreFilter), ctx, state, p) } // PreFilterExtensions mocks base method. @@ -84,6 +90,7 @@ func (mr *MockPreFilterPluginMockRecorder) PreFilterExtensions() *gomock.Call { type MockFilterPlugin struct { ctrl *gomock.Controller recorder *MockFilterPluginMockRecorder + isgomock struct{} } // MockFilterPluginMockRecorder is the mock recorder for MockFilterPlugin. @@ -104,17 +111,17 @@ func (m *MockFilterPlugin) EXPECT() *MockFilterPluginMockRecorder { } // Filter mocks base method. -func (m *MockFilterPlugin) Filter(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 *framework.NodeInfo) *framework.Status { +func (m *MockFilterPlugin) Filter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Filter", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "Filter", ctx, state, pod, nodeInfo) ret0, _ := ret[0].(*framework.Status) return ret0 } // Filter indicates an expected call of Filter. -func (mr *MockFilterPluginMockRecorder) Filter(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockFilterPluginMockRecorder) Filter(ctx, state, pod, nodeInfo any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockFilterPlugin)(nil).Filter), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockFilterPlugin)(nil).Filter), ctx, state, pod, nodeInfo) } // Name mocks base method. @@ -135,6 +142,7 @@ func (mr *MockFilterPluginMockRecorder) Name() *gomock.Call { type MockPostFilterPlugin struct { ctrl *gomock.Controller recorder *MockPostFilterPluginMockRecorder + isgomock struct{} } // MockPostFilterPluginMockRecorder is the mock recorder for MockPostFilterPlugin. @@ -169,24 +177,25 @@ func (mr *MockPostFilterPluginMockRecorder) Name() *gomock.Call { } // PostFilter mocks base method. -func (m *MockPostFilterPlugin) PostFilter(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 framework.NodeToStatusMap) (*framework.PostFilterResult, *framework.Status) { +func (m *MockPostFilterPlugin) PostFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, filteredNodeStatusMap framework.NodeToStatusMap) (*framework.PostFilterResult, *framework.Status) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "PostFilter", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "PostFilter", ctx, state, pod, filteredNodeStatusMap) ret0, _ := ret[0].(*framework.PostFilterResult) ret1, _ := ret[1].(*framework.Status) return ret0, ret1 } // PostFilter indicates an expected call of PostFilter. -func (mr *MockPostFilterPluginMockRecorder) PostFilter(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockPostFilterPluginMockRecorder) PostFilter(ctx, state, pod, filteredNodeStatusMap any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PostFilter", reflect.TypeOf((*MockPostFilterPlugin)(nil).PostFilter), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PostFilter", reflect.TypeOf((*MockPostFilterPlugin)(nil).PostFilter), ctx, state, pod, filteredNodeStatusMap) } // MockPreScorePlugin is a mock of PreScorePlugin interface. type MockPreScorePlugin struct { ctrl *gomock.Controller recorder *MockPreScorePluginMockRecorder + isgomock struct{} } // MockPreScorePluginMockRecorder is the mock recorder for MockPreScorePlugin. @@ -221,23 +230,24 @@ func (mr *MockPreScorePluginMockRecorder) Name() *gomock.Call { } // PreScore mocks base method. -func (m *MockPreScorePlugin) PreScore(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 []*v1.Node) *framework.Status { +func (m *MockPreScorePlugin) PreScore(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodes []*v1.Node) *framework.Status { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "PreScore", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "PreScore", ctx, state, pod, nodes) ret0, _ := ret[0].(*framework.Status) return ret0 } // PreScore indicates an expected call of PreScore. -func (mr *MockPreScorePluginMockRecorder) PreScore(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockPreScorePluginMockRecorder) PreScore(ctx, state, pod, nodes any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PreScore", reflect.TypeOf((*MockPreScorePlugin)(nil).PreScore), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PreScore", reflect.TypeOf((*MockPreScorePlugin)(nil).PreScore), ctx, state, pod, nodes) } // MockScorePlugin is a mock of ScorePlugin interface. type MockScorePlugin struct { ctrl *gomock.Controller recorder *MockScorePluginMockRecorder + isgomock struct{} } // MockScorePluginMockRecorder is the mock recorder for MockScorePlugin. @@ -272,18 +282,18 @@ func (mr *MockScorePluginMockRecorder) Name() *gomock.Call { } // Score mocks base method. -func (m *MockScorePlugin) Score(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 string) (int64, *framework.Status) { +func (m *MockScorePlugin) Score(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) (int64, *framework.Status) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Score", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "Score", ctx, state, p, nodeName) ret0, _ := ret[0].(int64) ret1, _ := ret[1].(*framework.Status) return ret0, ret1 } // Score indicates an expected call of Score. -func (mr *MockScorePluginMockRecorder) Score(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockScorePluginMockRecorder) Score(ctx, state, p, nodeName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Score", reflect.TypeOf((*MockScorePlugin)(nil).Score), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Score", reflect.TypeOf((*MockScorePlugin)(nil).Score), ctx, state, p, nodeName) } // ScoreExtensions mocks base method. @@ -304,6 +314,7 @@ func (mr *MockScorePluginMockRecorder) ScoreExtensions() *gomock.Call { type MockScoreExtensions struct { ctrl *gomock.Controller recorder *MockScoreExtensionsMockRecorder + isgomock struct{} } // MockScoreExtensionsMockRecorder is the mock recorder for MockScoreExtensions. @@ -324,23 +335,24 @@ func (m *MockScoreExtensions) EXPECT() *MockScoreExtensionsMockRecorder { } // NormalizeScore mocks base method. -func (m *MockScoreExtensions) NormalizeScore(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 framework.NodeScoreList) *framework.Status { +func (m *MockScoreExtensions) NormalizeScore(ctx context.Context, state *framework.CycleState, p *v1.Pod, scores framework.NodeScoreList) *framework.Status { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "NormalizeScore", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "NormalizeScore", ctx, state, p, scores) ret0, _ := ret[0].(*framework.Status) return ret0 } // NormalizeScore indicates an expected call of NormalizeScore. -func (mr *MockScoreExtensionsMockRecorder) NormalizeScore(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockScoreExtensionsMockRecorder) NormalizeScore(ctx, state, p, scores any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NormalizeScore", reflect.TypeOf((*MockScoreExtensions)(nil).NormalizeScore), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NormalizeScore", reflect.TypeOf((*MockScoreExtensions)(nil).NormalizeScore), ctx, state, p, scores) } // MockPermitPlugin is a mock of PermitPlugin interface. type MockPermitPlugin struct { ctrl *gomock.Controller recorder *MockPermitPluginMockRecorder + isgomock struct{} } // MockPermitPluginMockRecorder is the mock recorder for MockPermitPlugin. @@ -375,24 +387,25 @@ func (mr *MockPermitPluginMockRecorder) Name() *gomock.Call { } // Permit mocks base method. -func (m *MockPermitPlugin) Permit(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 string) (*framework.Status, time.Duration) { +func (m *MockPermitPlugin) Permit(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) (*framework.Status, time.Duration) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Permit", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "Permit", ctx, state, p, nodeName) ret0, _ := ret[0].(*framework.Status) ret1, _ := ret[1].(time.Duration) return ret0, ret1 } // Permit indicates an expected call of Permit. -func (mr *MockPermitPluginMockRecorder) Permit(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockPermitPluginMockRecorder) Permit(ctx, state, p, nodeName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Permit", reflect.TypeOf((*MockPermitPlugin)(nil).Permit), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Permit", reflect.TypeOf((*MockPermitPlugin)(nil).Permit), ctx, state, p, nodeName) } // MockBindPlugin is a mock of BindPlugin interface. type MockBindPlugin struct { ctrl *gomock.Controller recorder *MockBindPluginMockRecorder + isgomock struct{} } // MockBindPluginMockRecorder is the mock recorder for MockBindPlugin. @@ -413,17 +426,17 @@ func (m *MockBindPlugin) EXPECT() *MockBindPluginMockRecorder { } // Bind mocks base method. -func (m *MockBindPlugin) Bind(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 string) *framework.Status { +func (m *MockBindPlugin) Bind(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) *framework.Status { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Bind", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "Bind", ctx, state, p, nodeName) ret0, _ := ret[0].(*framework.Status) return ret0 } // Bind indicates an expected call of Bind. -func (mr *MockBindPluginMockRecorder) Bind(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockBindPluginMockRecorder) Bind(ctx, state, p, nodeName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bind", reflect.TypeOf((*MockBindPlugin)(nil).Bind), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bind", reflect.TypeOf((*MockBindPlugin)(nil).Bind), ctx, state, p, nodeName) } // Name mocks base method. @@ -444,6 +457,7 @@ func (mr *MockBindPluginMockRecorder) Name() *gomock.Call { type MockPreBindPlugin struct { ctrl *gomock.Controller recorder *MockPreBindPluginMockRecorder + isgomock struct{} } // MockPreBindPluginMockRecorder is the mock recorder for MockPreBindPlugin. @@ -478,23 +492,24 @@ func (mr *MockPreBindPluginMockRecorder) Name() *gomock.Call { } // PreBind mocks base method. -func (m *MockPreBindPlugin) PreBind(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 string) *framework.Status { +func (m *MockPreBindPlugin) PreBind(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) *framework.Status { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "PreBind", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "PreBind", ctx, state, p, nodeName) ret0, _ := ret[0].(*framework.Status) return ret0 } // PreBind indicates an expected call of PreBind. -func (mr *MockPreBindPluginMockRecorder) PreBind(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockPreBindPluginMockRecorder) PreBind(ctx, state, p, nodeName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PreBind", reflect.TypeOf((*MockPreBindPlugin)(nil).PreBind), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PreBind", reflect.TypeOf((*MockPreBindPlugin)(nil).PreBind), ctx, state, p, nodeName) } // MockPostBindPlugin is a mock of PostBindPlugin interface. type MockPostBindPlugin struct { ctrl *gomock.Controller recorder *MockPostBindPluginMockRecorder + isgomock struct{} } // MockPostBindPluginMockRecorder is the mock recorder for MockPostBindPlugin. @@ -529,21 +544,22 @@ func (mr *MockPostBindPluginMockRecorder) Name() *gomock.Call { } // PostBind mocks base method. -func (m *MockPostBindPlugin) PostBind(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 string) { +func (m *MockPostBindPlugin) PostBind(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) { m.ctrl.T.Helper() - m.ctrl.Call(m, "PostBind", arg0, arg1, arg2, arg3) + m.ctrl.Call(m, "PostBind", ctx, state, p, nodeName) } // PostBind indicates an expected call of PostBind. -func (mr *MockPostBindPluginMockRecorder) PostBind(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockPostBindPluginMockRecorder) PostBind(ctx, state, p, nodeName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PostBind", reflect.TypeOf((*MockPostBindPlugin)(nil).PostBind), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PostBind", reflect.TypeOf((*MockPostBindPlugin)(nil).PostBind), ctx, state, p, nodeName) } // MockReservePlugin is a mock of ReservePlugin interface. type MockReservePlugin struct { ctrl *gomock.Controller recorder *MockReservePluginMockRecorder + isgomock struct{} } // MockReservePluginMockRecorder is the mock recorder for MockReservePlugin. @@ -578,27 +594,27 @@ func (mr *MockReservePluginMockRecorder) Name() *gomock.Call { } // Reserve mocks base method. -func (m *MockReservePlugin) Reserve(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 string) *framework.Status { +func (m *MockReservePlugin) Reserve(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) *framework.Status { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Reserve", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "Reserve", ctx, state, p, nodeName) ret0, _ := ret[0].(*framework.Status) return ret0 } // Reserve indicates an expected call of Reserve. -func (mr *MockReservePluginMockRecorder) Reserve(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockReservePluginMockRecorder) Reserve(ctx, state, p, nodeName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reserve", reflect.TypeOf((*MockReservePlugin)(nil).Reserve), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reserve", reflect.TypeOf((*MockReservePlugin)(nil).Reserve), ctx, state, p, nodeName) } // Unreserve mocks base method. -func (m *MockReservePlugin) Unreserve(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 string) { +func (m *MockReservePlugin) Unreserve(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) { m.ctrl.T.Helper() - m.ctrl.Call(m, "Unreserve", arg0, arg1, arg2, arg3) + m.ctrl.Call(m, "Unreserve", ctx, state, p, nodeName) } // Unreserve indicates an expected call of Unreserve. -func (mr *MockReservePluginMockRecorder) Unreserve(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockReservePluginMockRecorder) Unreserve(ctx, state, p, nodeName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unreserve", reflect.TypeOf((*MockReservePlugin)(nil).Unreserve), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unreserve", reflect.TypeOf((*MockReservePlugin)(nil).Unreserve), ctx, state, p, nodeName) } diff --git a/simulator/scheduler/plugin/mock/wrappedplugin.go b/simulator/scheduler/plugin/mock/wrappedplugin.go index 16f895c36..664a58df2 100644 --- a/simulator/scheduler/plugin/mock/wrappedplugin.go +++ b/simulator/scheduler/plugin/mock/wrappedplugin.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: sigs.k8s.io/kube-scheduler-simulator/simulator/scheduler/plugin (interfaces: Store,PreFilterPluginExtender,FilterPluginExtender,PostFilterPluginExtender,PreScorePluginExtender,ScorePluginExtender,NormalizeScorePluginExtender,ReservePluginExtender,PermitPluginExtender,PreBindPluginExtender,BindPluginExtender,PostBindPluginExtender) +// +// Generated by this command: +// +// mockgen -destination=./mock/wrappedplugin.go -package=plugin . Store,PreFilterPluginExtender,FilterPluginExtender,PostFilterPluginExtender,PreScorePluginExtender,ScorePluginExtender,NormalizeScorePluginExtender,ReservePluginExtender,PermitPluginExtender,PreBindPluginExtender,BindPluginExtender,PostBindPluginExtender +// // Package plugin is a generated GoMock package. package plugin @@ -9,7 +14,7 @@ import ( reflect "reflect" time "time" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" v1 "k8s.io/api/core/v1" framework "k8s.io/kubernetes/pkg/scheduler/framework" ) @@ -18,6 +23,7 @@ import ( type MockStore struct { ctrl *gomock.Controller recorder *MockStoreMockRecorder + isgomock struct{} } // MockStoreMockRecorder is the mock recorder for MockStore. @@ -38,153 +44,154 @@ func (m *MockStore) EXPECT() *MockStoreMockRecorder { } // AddBindResult mocks base method. -func (m *MockStore) AddBindResult(arg0, arg1, arg2, arg3 string) { +func (m *MockStore) AddBindResult(namespace, podName, pluginName, status string) { m.ctrl.T.Helper() - m.ctrl.Call(m, "AddBindResult", arg0, arg1, arg2, arg3) + m.ctrl.Call(m, "AddBindResult", namespace, podName, pluginName, status) } // AddBindResult indicates an expected call of AddBindResult. -func (mr *MockStoreMockRecorder) AddBindResult(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) AddBindResult(namespace, podName, pluginName, status any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddBindResult", reflect.TypeOf((*MockStore)(nil).AddBindResult), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddBindResult", reflect.TypeOf((*MockStore)(nil).AddBindResult), namespace, podName, pluginName, status) } // AddCustomResult mocks base method. -func (m *MockStore) AddCustomResult(arg0, arg1, arg2, arg3 string) { +func (m *MockStore) AddCustomResult(namespace, podName, annotationKey, result string) { m.ctrl.T.Helper() - m.ctrl.Call(m, "AddCustomResult", arg0, arg1, arg2, arg3) + m.ctrl.Call(m, "AddCustomResult", namespace, podName, annotationKey, result) } // AddCustomResult indicates an expected call of AddCustomResult. -func (mr *MockStoreMockRecorder) AddCustomResult(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) AddCustomResult(namespace, podName, annotationKey, result any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddCustomResult", reflect.TypeOf((*MockStore)(nil).AddCustomResult), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddCustomResult", reflect.TypeOf((*MockStore)(nil).AddCustomResult), namespace, podName, annotationKey, result) } // AddFilterResult mocks base method. -func (m *MockStore) AddFilterResult(arg0, arg1, arg2, arg3, arg4 string) { +func (m *MockStore) AddFilterResult(namespace, podName, nodeName, pluginName, reason string) { m.ctrl.T.Helper() - m.ctrl.Call(m, "AddFilterResult", arg0, arg1, arg2, arg3, arg4) + m.ctrl.Call(m, "AddFilterResult", namespace, podName, nodeName, pluginName, reason) } // AddFilterResult indicates an expected call of AddFilterResult. -func (mr *MockStoreMockRecorder) AddFilterResult(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) AddFilterResult(namespace, podName, nodeName, pluginName, reason any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddFilterResult", reflect.TypeOf((*MockStore)(nil).AddFilterResult), arg0, arg1, arg2, arg3, arg4) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddFilterResult", reflect.TypeOf((*MockStore)(nil).AddFilterResult), namespace, podName, nodeName, pluginName, reason) } // AddNormalizedScoreResult mocks base method. -func (m *MockStore) AddNormalizedScoreResult(arg0, arg1, arg2, arg3 string, arg4 int64) { +func (m *MockStore) AddNormalizedScoreResult(namespace, podName, nodeName, pluginName string, normalizedscore int64) { m.ctrl.T.Helper() - m.ctrl.Call(m, "AddNormalizedScoreResult", arg0, arg1, arg2, arg3, arg4) + m.ctrl.Call(m, "AddNormalizedScoreResult", namespace, podName, nodeName, pluginName, normalizedscore) } // AddNormalizedScoreResult indicates an expected call of AddNormalizedScoreResult. -func (mr *MockStoreMockRecorder) AddNormalizedScoreResult(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) AddNormalizedScoreResult(namespace, podName, nodeName, pluginName, normalizedscore any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddNormalizedScoreResult", reflect.TypeOf((*MockStore)(nil).AddNormalizedScoreResult), arg0, arg1, arg2, arg3, arg4) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddNormalizedScoreResult", reflect.TypeOf((*MockStore)(nil).AddNormalizedScoreResult), namespace, podName, nodeName, pluginName, normalizedscore) } // AddPermitResult mocks base method. -func (m *MockStore) AddPermitResult(arg0, arg1, arg2, arg3 string, arg4 time.Duration) { +func (m *MockStore) AddPermitResult(namespace, podName, pluginName, status string, timeout time.Duration) { m.ctrl.T.Helper() - m.ctrl.Call(m, "AddPermitResult", arg0, arg1, arg2, arg3, arg4) + m.ctrl.Call(m, "AddPermitResult", namespace, podName, pluginName, status, timeout) } // AddPermitResult indicates an expected call of AddPermitResult. -func (mr *MockStoreMockRecorder) AddPermitResult(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) AddPermitResult(namespace, podName, pluginName, status, timeout any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPermitResult", reflect.TypeOf((*MockStore)(nil).AddPermitResult), arg0, arg1, arg2, arg3, arg4) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPermitResult", reflect.TypeOf((*MockStore)(nil).AddPermitResult), namespace, podName, pluginName, status, timeout) } // AddPostFilterResult mocks base method. -func (m *MockStore) AddPostFilterResult(arg0, arg1, arg2, arg3 string, arg4 []string) { +func (m *MockStore) AddPostFilterResult(namespace, podName, nominatedNodeName, pluginName string, nodeNames []string) { m.ctrl.T.Helper() - m.ctrl.Call(m, "AddPostFilterResult", arg0, arg1, arg2, arg3, arg4) + m.ctrl.Call(m, "AddPostFilterResult", namespace, podName, nominatedNodeName, pluginName, nodeNames) } // AddPostFilterResult indicates an expected call of AddPostFilterResult. -func (mr *MockStoreMockRecorder) AddPostFilterResult(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) AddPostFilterResult(namespace, podName, nominatedNodeName, pluginName, nodeNames any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPostFilterResult", reflect.TypeOf((*MockStore)(nil).AddPostFilterResult), arg0, arg1, arg2, arg3, arg4) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPostFilterResult", reflect.TypeOf((*MockStore)(nil).AddPostFilterResult), namespace, podName, nominatedNodeName, pluginName, nodeNames) } // AddPreBindResult mocks base method. -func (m *MockStore) AddPreBindResult(arg0, arg1, arg2, arg3 string) { +func (m *MockStore) AddPreBindResult(namespace, podName, pluginName, status string) { m.ctrl.T.Helper() - m.ctrl.Call(m, "AddPreBindResult", arg0, arg1, arg2, arg3) + m.ctrl.Call(m, "AddPreBindResult", namespace, podName, pluginName, status) } // AddPreBindResult indicates an expected call of AddPreBindResult. -func (mr *MockStoreMockRecorder) AddPreBindResult(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) AddPreBindResult(namespace, podName, pluginName, status any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPreBindResult", reflect.TypeOf((*MockStore)(nil).AddPreBindResult), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPreBindResult", reflect.TypeOf((*MockStore)(nil).AddPreBindResult), namespace, podName, pluginName, status) } // AddPreFilterResult mocks base method. -func (m *MockStore) AddPreFilterResult(arg0, arg1, arg2, arg3 string, arg4 *framework.PreFilterResult) { +func (m *MockStore) AddPreFilterResult(namespace, podName, pluginName, reason string, preFilterResult *framework.PreFilterResult) { m.ctrl.T.Helper() - m.ctrl.Call(m, "AddPreFilterResult", arg0, arg1, arg2, arg3, arg4) + m.ctrl.Call(m, "AddPreFilterResult", namespace, podName, pluginName, reason, preFilterResult) } // AddPreFilterResult indicates an expected call of AddPreFilterResult. -func (mr *MockStoreMockRecorder) AddPreFilterResult(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) AddPreFilterResult(namespace, podName, pluginName, reason, preFilterResult any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPreFilterResult", reflect.TypeOf((*MockStore)(nil).AddPreFilterResult), arg0, arg1, arg2, arg3, arg4) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPreFilterResult", reflect.TypeOf((*MockStore)(nil).AddPreFilterResult), namespace, podName, pluginName, reason, preFilterResult) } // AddPreScoreResult mocks base method. -func (m *MockStore) AddPreScoreResult(arg0, arg1, arg2, arg3 string) { +func (m *MockStore) AddPreScoreResult(namespace, podName, pluginName, reason string) { m.ctrl.T.Helper() - m.ctrl.Call(m, "AddPreScoreResult", arg0, arg1, arg2, arg3) + m.ctrl.Call(m, "AddPreScoreResult", namespace, podName, pluginName, reason) } // AddPreScoreResult indicates an expected call of AddPreScoreResult. -func (mr *MockStoreMockRecorder) AddPreScoreResult(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) AddPreScoreResult(namespace, podName, pluginName, reason any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPreScoreResult", reflect.TypeOf((*MockStore)(nil).AddPreScoreResult), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPreScoreResult", reflect.TypeOf((*MockStore)(nil).AddPreScoreResult), namespace, podName, pluginName, reason) } // AddReserveResult mocks base method. -func (m *MockStore) AddReserveResult(arg0, arg1, arg2, arg3 string) { +func (m *MockStore) AddReserveResult(namespace, podName, pluginName, status string) { m.ctrl.T.Helper() - m.ctrl.Call(m, "AddReserveResult", arg0, arg1, arg2, arg3) + m.ctrl.Call(m, "AddReserveResult", namespace, podName, pluginName, status) } // AddReserveResult indicates an expected call of AddReserveResult. -func (mr *MockStoreMockRecorder) AddReserveResult(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) AddReserveResult(namespace, podName, pluginName, status any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddReserveResult", reflect.TypeOf((*MockStore)(nil).AddReserveResult), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddReserveResult", reflect.TypeOf((*MockStore)(nil).AddReserveResult), namespace, podName, pluginName, status) } // AddScoreResult mocks base method. -func (m *MockStore) AddScoreResult(arg0, arg1, arg2, arg3 string, arg4 int64) { +func (m *MockStore) AddScoreResult(namespace, podName, nodeName, pluginName string, score int64) { m.ctrl.T.Helper() - m.ctrl.Call(m, "AddScoreResult", arg0, arg1, arg2, arg3, arg4) + m.ctrl.Call(m, "AddScoreResult", namespace, podName, nodeName, pluginName, score) } // AddScoreResult indicates an expected call of AddScoreResult. -func (mr *MockStoreMockRecorder) AddScoreResult(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) AddScoreResult(namespace, podName, nodeName, pluginName, score any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddScoreResult", reflect.TypeOf((*MockStore)(nil).AddScoreResult), arg0, arg1, arg2, arg3, arg4) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddScoreResult", reflect.TypeOf((*MockStore)(nil).AddScoreResult), namespace, podName, nodeName, pluginName, score) } // AddSelectedNode mocks base method. -func (m *MockStore) AddSelectedNode(arg0, arg1, arg2 string) { +func (m *MockStore) AddSelectedNode(namespace, podName, nodeName string) { m.ctrl.T.Helper() - m.ctrl.Call(m, "AddSelectedNode", arg0, arg1, arg2) + m.ctrl.Call(m, "AddSelectedNode", namespace, podName, nodeName) } // AddSelectedNode indicates an expected call of AddSelectedNode. -func (mr *MockStoreMockRecorder) AddSelectedNode(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) AddSelectedNode(namespace, podName, nodeName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSelectedNode", reflect.TypeOf((*MockStore)(nil).AddSelectedNode), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSelectedNode", reflect.TypeOf((*MockStore)(nil).AddSelectedNode), namespace, podName, nodeName) } // MockPreFilterPluginExtender is a mock of PreFilterPluginExtender interface. type MockPreFilterPluginExtender struct { ctrl *gomock.Controller recorder *MockPreFilterPluginExtenderMockRecorder + isgomock struct{} } // MockPreFilterPluginExtenderMockRecorder is the mock recorder for MockPreFilterPluginExtender. @@ -205,39 +212,40 @@ func (m *MockPreFilterPluginExtender) EXPECT() *MockPreFilterPluginExtenderMockR } // AfterPreFilter mocks base method. -func (m *MockPreFilterPluginExtender) AfterPreFilter(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 *framework.PreFilterResult, arg4 *framework.Status) (*framework.PreFilterResult, *framework.Status) { +func (m *MockPreFilterPluginExtender) AfterPreFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, preFilterResult *framework.PreFilterResult, preFilterStatus *framework.Status) (*framework.PreFilterResult, *framework.Status) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AfterPreFilter", arg0, arg1, arg2, arg3, arg4) + ret := m.ctrl.Call(m, "AfterPreFilter", ctx, state, pod, preFilterResult, preFilterStatus) ret0, _ := ret[0].(*framework.PreFilterResult) ret1, _ := ret[1].(*framework.Status) return ret0, ret1 } // AfterPreFilter indicates an expected call of AfterPreFilter. -func (mr *MockPreFilterPluginExtenderMockRecorder) AfterPreFilter(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { +func (mr *MockPreFilterPluginExtenderMockRecorder) AfterPreFilter(ctx, state, pod, preFilterResult, preFilterStatus any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterPreFilter", reflect.TypeOf((*MockPreFilterPluginExtender)(nil).AfterPreFilter), arg0, arg1, arg2, arg3, arg4) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterPreFilter", reflect.TypeOf((*MockPreFilterPluginExtender)(nil).AfterPreFilter), ctx, state, pod, preFilterResult, preFilterStatus) } // BeforePreFilter mocks base method. -func (m *MockPreFilterPluginExtender) BeforePreFilter(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod) (*framework.PreFilterResult, *framework.Status) { +func (m *MockPreFilterPluginExtender) BeforePreFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod) (*framework.PreFilterResult, *framework.Status) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BeforePreFilter", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "BeforePreFilter", ctx, state, pod) ret0, _ := ret[0].(*framework.PreFilterResult) ret1, _ := ret[1].(*framework.Status) return ret0, ret1 } // BeforePreFilter indicates an expected call of BeforePreFilter. -func (mr *MockPreFilterPluginExtenderMockRecorder) BeforePreFilter(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockPreFilterPluginExtenderMockRecorder) BeforePreFilter(ctx, state, pod any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforePreFilter", reflect.TypeOf((*MockPreFilterPluginExtender)(nil).BeforePreFilter), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforePreFilter", reflect.TypeOf((*MockPreFilterPluginExtender)(nil).BeforePreFilter), ctx, state, pod) } // MockFilterPluginExtender is a mock of FilterPluginExtender interface. type MockFilterPluginExtender struct { ctrl *gomock.Controller recorder *MockFilterPluginExtenderMockRecorder + isgomock struct{} } // MockFilterPluginExtenderMockRecorder is the mock recorder for MockFilterPluginExtender. @@ -258,37 +266,38 @@ func (m *MockFilterPluginExtender) EXPECT() *MockFilterPluginExtenderMockRecorde } // AfterFilter mocks base method. -func (m *MockFilterPluginExtender) AfterFilter(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 *framework.NodeInfo, arg4 *framework.Status) *framework.Status { +func (m *MockFilterPluginExtender) AfterFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo, filterResult *framework.Status) *framework.Status { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AfterFilter", arg0, arg1, arg2, arg3, arg4) + ret := m.ctrl.Call(m, "AfterFilter", ctx, state, pod, nodeInfo, filterResult) ret0, _ := ret[0].(*framework.Status) return ret0 } // AfterFilter indicates an expected call of AfterFilter. -func (mr *MockFilterPluginExtenderMockRecorder) AfterFilter(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { +func (mr *MockFilterPluginExtenderMockRecorder) AfterFilter(ctx, state, pod, nodeInfo, filterResult any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFilter", reflect.TypeOf((*MockFilterPluginExtender)(nil).AfterFilter), arg0, arg1, arg2, arg3, arg4) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFilter", reflect.TypeOf((*MockFilterPluginExtender)(nil).AfterFilter), ctx, state, pod, nodeInfo, filterResult) } // BeforeFilter mocks base method. -func (m *MockFilterPluginExtender) BeforeFilter(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 *framework.NodeInfo) *framework.Status { +func (m *MockFilterPluginExtender) BeforeFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BeforeFilter", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "BeforeFilter", ctx, state, pod, nodeInfo) ret0, _ := ret[0].(*framework.Status) return ret0 } // BeforeFilter indicates an expected call of BeforeFilter. -func (mr *MockFilterPluginExtenderMockRecorder) BeforeFilter(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockFilterPluginExtenderMockRecorder) BeforeFilter(ctx, state, pod, nodeInfo any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforeFilter", reflect.TypeOf((*MockFilterPluginExtender)(nil).BeforeFilter), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforeFilter", reflect.TypeOf((*MockFilterPluginExtender)(nil).BeforeFilter), ctx, state, pod, nodeInfo) } // MockPostFilterPluginExtender is a mock of PostFilterPluginExtender interface. type MockPostFilterPluginExtender struct { ctrl *gomock.Controller recorder *MockPostFilterPluginExtenderMockRecorder + isgomock struct{} } // MockPostFilterPluginExtenderMockRecorder is the mock recorder for MockPostFilterPluginExtender. @@ -309,39 +318,40 @@ func (m *MockPostFilterPluginExtender) EXPECT() *MockPostFilterPluginExtenderMoc } // AfterPostFilter mocks base method. -func (m *MockPostFilterPluginExtender) AfterPostFilter(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 framework.NodeToStatusMap, arg4 *framework.PostFilterResult, arg5 *framework.Status) (*framework.PostFilterResult, *framework.Status) { +func (m *MockPostFilterPluginExtender) AfterPostFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, filteredNodeStatusMap framework.NodeToStatusMap, postFilterResult *framework.PostFilterResult, status *framework.Status) (*framework.PostFilterResult, *framework.Status) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AfterPostFilter", arg0, arg1, arg2, arg3, arg4, arg5) + ret := m.ctrl.Call(m, "AfterPostFilter", ctx, state, pod, filteredNodeStatusMap, postFilterResult, status) ret0, _ := ret[0].(*framework.PostFilterResult) ret1, _ := ret[1].(*framework.Status) return ret0, ret1 } // AfterPostFilter indicates an expected call of AfterPostFilter. -func (mr *MockPostFilterPluginExtenderMockRecorder) AfterPostFilter(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call { +func (mr *MockPostFilterPluginExtenderMockRecorder) AfterPostFilter(ctx, state, pod, filteredNodeStatusMap, postFilterResult, status any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterPostFilter", reflect.TypeOf((*MockPostFilterPluginExtender)(nil).AfterPostFilter), arg0, arg1, arg2, arg3, arg4, arg5) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterPostFilter", reflect.TypeOf((*MockPostFilterPluginExtender)(nil).AfterPostFilter), ctx, state, pod, filteredNodeStatusMap, postFilterResult, status) } // BeforePostFilter mocks base method. -func (m *MockPostFilterPluginExtender) BeforePostFilter(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 framework.NodeToStatusMap) (*framework.PostFilterResult, *framework.Status) { +func (m *MockPostFilterPluginExtender) BeforePostFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, filteredNodeStatusMap framework.NodeToStatusMap) (*framework.PostFilterResult, *framework.Status) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BeforePostFilter", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "BeforePostFilter", ctx, state, pod, filteredNodeStatusMap) ret0, _ := ret[0].(*framework.PostFilterResult) ret1, _ := ret[1].(*framework.Status) return ret0, ret1 } // BeforePostFilter indicates an expected call of BeforePostFilter. -func (mr *MockPostFilterPluginExtenderMockRecorder) BeforePostFilter(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockPostFilterPluginExtenderMockRecorder) BeforePostFilter(ctx, state, pod, filteredNodeStatusMap any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforePostFilter", reflect.TypeOf((*MockPostFilterPluginExtender)(nil).BeforePostFilter), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforePostFilter", reflect.TypeOf((*MockPostFilterPluginExtender)(nil).BeforePostFilter), ctx, state, pod, filteredNodeStatusMap) } // MockPreScorePluginExtender is a mock of PreScorePluginExtender interface. type MockPreScorePluginExtender struct { ctrl *gomock.Controller recorder *MockPreScorePluginExtenderMockRecorder + isgomock struct{} } // MockPreScorePluginExtenderMockRecorder is the mock recorder for MockPreScorePluginExtender. @@ -362,37 +372,38 @@ func (m *MockPreScorePluginExtender) EXPECT() *MockPreScorePluginExtenderMockRec } // AfterPreScore mocks base method. -func (m *MockPreScorePluginExtender) AfterPreScore(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 []*v1.Node, arg4 *framework.Status) *framework.Status { +func (m *MockPreScorePluginExtender) AfterPreScore(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodes []*v1.Node, preScoreStatus *framework.Status) *framework.Status { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AfterPreScore", arg0, arg1, arg2, arg3, arg4) + ret := m.ctrl.Call(m, "AfterPreScore", ctx, state, pod, nodes, preScoreStatus) ret0, _ := ret[0].(*framework.Status) return ret0 } // AfterPreScore indicates an expected call of AfterPreScore. -func (mr *MockPreScorePluginExtenderMockRecorder) AfterPreScore(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { +func (mr *MockPreScorePluginExtenderMockRecorder) AfterPreScore(ctx, state, pod, nodes, preScoreStatus any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterPreScore", reflect.TypeOf((*MockPreScorePluginExtender)(nil).AfterPreScore), arg0, arg1, arg2, arg3, arg4) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterPreScore", reflect.TypeOf((*MockPreScorePluginExtender)(nil).AfterPreScore), ctx, state, pod, nodes, preScoreStatus) } // BeforePreScore mocks base method. -func (m *MockPreScorePluginExtender) BeforePreScore(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 []*v1.Node) *framework.Status { +func (m *MockPreScorePluginExtender) BeforePreScore(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodes []*v1.Node) *framework.Status { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BeforePreScore", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "BeforePreScore", ctx, state, pod, nodes) ret0, _ := ret[0].(*framework.Status) return ret0 } // BeforePreScore indicates an expected call of BeforePreScore. -func (mr *MockPreScorePluginExtenderMockRecorder) BeforePreScore(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockPreScorePluginExtenderMockRecorder) BeforePreScore(ctx, state, pod, nodes any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforePreScore", reflect.TypeOf((*MockPreScorePluginExtender)(nil).BeforePreScore), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforePreScore", reflect.TypeOf((*MockPreScorePluginExtender)(nil).BeforePreScore), ctx, state, pod, nodes) } // MockScorePluginExtender is a mock of ScorePluginExtender interface. type MockScorePluginExtender struct { ctrl *gomock.Controller recorder *MockScorePluginExtenderMockRecorder + isgomock struct{} } // MockScorePluginExtenderMockRecorder is the mock recorder for MockScorePluginExtender. @@ -413,39 +424,40 @@ func (m *MockScorePluginExtender) EXPECT() *MockScorePluginExtenderMockRecorder } // AfterScore mocks base method. -func (m *MockScorePluginExtender) AfterScore(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 string, arg4 int64, arg5 *framework.Status) (int64, *framework.Status) { +func (m *MockScorePluginExtender) AfterScore(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string, score int64, scoreResult *framework.Status) (int64, *framework.Status) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AfterScore", arg0, arg1, arg2, arg3, arg4, arg5) + ret := m.ctrl.Call(m, "AfterScore", ctx, state, pod, nodeName, score, scoreResult) ret0, _ := ret[0].(int64) ret1, _ := ret[1].(*framework.Status) return ret0, ret1 } // AfterScore indicates an expected call of AfterScore. -func (mr *MockScorePluginExtenderMockRecorder) AfterScore(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call { +func (mr *MockScorePluginExtenderMockRecorder) AfterScore(ctx, state, pod, nodeName, score, scoreResult any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterScore", reflect.TypeOf((*MockScorePluginExtender)(nil).AfterScore), arg0, arg1, arg2, arg3, arg4, arg5) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterScore", reflect.TypeOf((*MockScorePluginExtender)(nil).AfterScore), ctx, state, pod, nodeName, score, scoreResult) } // BeforeScore mocks base method. -func (m *MockScorePluginExtender) BeforeScore(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 string) (int64, *framework.Status) { +func (m *MockScorePluginExtender) BeforeScore(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BeforeScore", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "BeforeScore", ctx, state, pod, nodeName) ret0, _ := ret[0].(int64) ret1, _ := ret[1].(*framework.Status) return ret0, ret1 } // BeforeScore indicates an expected call of BeforeScore. -func (mr *MockScorePluginExtenderMockRecorder) BeforeScore(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockScorePluginExtenderMockRecorder) BeforeScore(ctx, state, pod, nodeName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforeScore", reflect.TypeOf((*MockScorePluginExtender)(nil).BeforeScore), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforeScore", reflect.TypeOf((*MockScorePluginExtender)(nil).BeforeScore), ctx, state, pod, nodeName) } // MockNormalizeScorePluginExtender is a mock of NormalizeScorePluginExtender interface. type MockNormalizeScorePluginExtender struct { ctrl *gomock.Controller recorder *MockNormalizeScorePluginExtenderMockRecorder + isgomock struct{} } // MockNormalizeScorePluginExtenderMockRecorder is the mock recorder for MockNormalizeScorePluginExtender. @@ -466,37 +478,38 @@ func (m *MockNormalizeScorePluginExtender) EXPECT() *MockNormalizeScorePluginExt } // AfterNormalizeScore mocks base method. -func (m *MockNormalizeScorePluginExtender) AfterNormalizeScore(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 framework.NodeScoreList, arg4 *framework.Status) *framework.Status { +func (m *MockNormalizeScorePluginExtender) AfterNormalizeScore(ctx context.Context, state *framework.CycleState, pod *v1.Pod, scores framework.NodeScoreList, normalizeScoreResult *framework.Status) *framework.Status { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AfterNormalizeScore", arg0, arg1, arg2, arg3, arg4) + ret := m.ctrl.Call(m, "AfterNormalizeScore", ctx, state, pod, scores, normalizeScoreResult) ret0, _ := ret[0].(*framework.Status) return ret0 } // AfterNormalizeScore indicates an expected call of AfterNormalizeScore. -func (mr *MockNormalizeScorePluginExtenderMockRecorder) AfterNormalizeScore(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { +func (mr *MockNormalizeScorePluginExtenderMockRecorder) AfterNormalizeScore(ctx, state, pod, scores, normalizeScoreResult any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterNormalizeScore", reflect.TypeOf((*MockNormalizeScorePluginExtender)(nil).AfterNormalizeScore), arg0, arg1, arg2, arg3, arg4) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterNormalizeScore", reflect.TypeOf((*MockNormalizeScorePluginExtender)(nil).AfterNormalizeScore), ctx, state, pod, scores, normalizeScoreResult) } // BeforeNormalizeScore mocks base method. -func (m *MockNormalizeScorePluginExtender) BeforeNormalizeScore(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 framework.NodeScoreList) *framework.Status { +func (m *MockNormalizeScorePluginExtender) BeforeNormalizeScore(ctx context.Context, state *framework.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *framework.Status { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BeforeNormalizeScore", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "BeforeNormalizeScore", ctx, state, pod, scores) ret0, _ := ret[0].(*framework.Status) return ret0 } // BeforeNormalizeScore indicates an expected call of BeforeNormalizeScore. -func (mr *MockNormalizeScorePluginExtenderMockRecorder) BeforeNormalizeScore(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockNormalizeScorePluginExtenderMockRecorder) BeforeNormalizeScore(ctx, state, pod, scores any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforeNormalizeScore", reflect.TypeOf((*MockNormalizeScorePluginExtender)(nil).BeforeNormalizeScore), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforeNormalizeScore", reflect.TypeOf((*MockNormalizeScorePluginExtender)(nil).BeforeNormalizeScore), ctx, state, pod, scores) } // MockReservePluginExtender is a mock of ReservePluginExtender interface. type MockReservePluginExtender struct { ctrl *gomock.Controller recorder *MockReservePluginExtenderMockRecorder + isgomock struct{} } // MockReservePluginExtenderMockRecorder is the mock recorder for MockReservePluginExtender. @@ -517,63 +530,64 @@ func (m *MockReservePluginExtender) EXPECT() *MockReservePluginExtenderMockRecor } // AfterReserve mocks base method. -func (m *MockReservePluginExtender) AfterReserve(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 string, arg4 *framework.Status) *framework.Status { +func (m *MockReservePluginExtender) AfterReserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodename string, reserveStatus *framework.Status) *framework.Status { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AfterReserve", arg0, arg1, arg2, arg3, arg4) + ret := m.ctrl.Call(m, "AfterReserve", ctx, state, pod, nodename, reserveStatus) ret0, _ := ret[0].(*framework.Status) return ret0 } // AfterReserve indicates an expected call of AfterReserve. -func (mr *MockReservePluginExtenderMockRecorder) AfterReserve(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { +func (mr *MockReservePluginExtenderMockRecorder) AfterReserve(ctx, state, pod, nodename, reserveStatus any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterReserve", reflect.TypeOf((*MockReservePluginExtender)(nil).AfterReserve), arg0, arg1, arg2, arg3, arg4) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterReserve", reflect.TypeOf((*MockReservePluginExtender)(nil).AfterReserve), ctx, state, pod, nodename, reserveStatus) } // AfterUnreserve mocks base method. -func (m *MockReservePluginExtender) AfterUnreserve(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 string) { +func (m *MockReservePluginExtender) AfterUnreserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodename string) { m.ctrl.T.Helper() - m.ctrl.Call(m, "AfterUnreserve", arg0, arg1, arg2, arg3) + m.ctrl.Call(m, "AfterUnreserve", ctx, state, pod, nodename) } // AfterUnreserve indicates an expected call of AfterUnreserve. -func (mr *MockReservePluginExtenderMockRecorder) AfterUnreserve(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockReservePluginExtenderMockRecorder) AfterUnreserve(ctx, state, pod, nodename any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterUnreserve", reflect.TypeOf((*MockReservePluginExtender)(nil).AfterUnreserve), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterUnreserve", reflect.TypeOf((*MockReservePluginExtender)(nil).AfterUnreserve), ctx, state, pod, nodename) } // BeforeReserve mocks base method. -func (m *MockReservePluginExtender) BeforeReserve(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 string) *framework.Status { +func (m *MockReservePluginExtender) BeforeReserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodename string) *framework.Status { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BeforeReserve", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "BeforeReserve", ctx, state, pod, nodename) ret0, _ := ret[0].(*framework.Status) return ret0 } // BeforeReserve indicates an expected call of BeforeReserve. -func (mr *MockReservePluginExtenderMockRecorder) BeforeReserve(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockReservePluginExtenderMockRecorder) BeforeReserve(ctx, state, pod, nodename any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforeReserve", reflect.TypeOf((*MockReservePluginExtender)(nil).BeforeReserve), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforeReserve", reflect.TypeOf((*MockReservePluginExtender)(nil).BeforeReserve), ctx, state, pod, nodename) } // BeforeUnreserve mocks base method. -func (m *MockReservePluginExtender) BeforeUnreserve(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 string) *framework.Status { +func (m *MockReservePluginExtender) BeforeUnreserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodename string) *framework.Status { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BeforeUnreserve", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "BeforeUnreserve", ctx, state, pod, nodename) ret0, _ := ret[0].(*framework.Status) return ret0 } // BeforeUnreserve indicates an expected call of BeforeUnreserve. -func (mr *MockReservePluginExtenderMockRecorder) BeforeUnreserve(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockReservePluginExtenderMockRecorder) BeforeUnreserve(ctx, state, pod, nodename any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforeUnreserve", reflect.TypeOf((*MockReservePluginExtender)(nil).BeforeUnreserve), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforeUnreserve", reflect.TypeOf((*MockReservePluginExtender)(nil).BeforeUnreserve), ctx, state, pod, nodename) } // MockPermitPluginExtender is a mock of PermitPluginExtender interface. type MockPermitPluginExtender struct { ctrl *gomock.Controller recorder *MockPermitPluginExtenderMockRecorder + isgomock struct{} } // MockPermitPluginExtenderMockRecorder is the mock recorder for MockPermitPluginExtender. @@ -594,39 +608,40 @@ func (m *MockPermitPluginExtender) EXPECT() *MockPermitPluginExtenderMockRecorde } // AfterPermit mocks base method. -func (m *MockPermitPluginExtender) AfterPermit(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 string, arg4 *framework.Status, arg5 time.Duration) (*framework.Status, time.Duration) { +func (m *MockPermitPluginExtender) AfterPermit(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string, permitResult *framework.Status, timeout time.Duration) (*framework.Status, time.Duration) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AfterPermit", arg0, arg1, arg2, arg3, arg4, arg5) + ret := m.ctrl.Call(m, "AfterPermit", ctx, state, pod, nodeName, permitResult, timeout) ret0, _ := ret[0].(*framework.Status) ret1, _ := ret[1].(time.Duration) return ret0, ret1 } // AfterPermit indicates an expected call of AfterPermit. -func (mr *MockPermitPluginExtenderMockRecorder) AfterPermit(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call { +func (mr *MockPermitPluginExtenderMockRecorder) AfterPermit(ctx, state, pod, nodeName, permitResult, timeout any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterPermit", reflect.TypeOf((*MockPermitPluginExtender)(nil).AfterPermit), arg0, arg1, arg2, arg3, arg4, arg5) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterPermit", reflect.TypeOf((*MockPermitPluginExtender)(nil).AfterPermit), ctx, state, pod, nodeName, permitResult, timeout) } // BeforePermit mocks base method. -func (m *MockPermitPluginExtender) BeforePermit(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 string) (*framework.Status, time.Duration) { +func (m *MockPermitPluginExtender) BeforePermit(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (*framework.Status, time.Duration) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BeforePermit", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "BeforePermit", ctx, state, pod, nodeName) ret0, _ := ret[0].(*framework.Status) ret1, _ := ret[1].(time.Duration) return ret0, ret1 } // BeforePermit indicates an expected call of BeforePermit. -func (mr *MockPermitPluginExtenderMockRecorder) BeforePermit(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockPermitPluginExtenderMockRecorder) BeforePermit(ctx, state, pod, nodeName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforePermit", reflect.TypeOf((*MockPermitPluginExtender)(nil).BeforePermit), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforePermit", reflect.TypeOf((*MockPermitPluginExtender)(nil).BeforePermit), ctx, state, pod, nodeName) } // MockPreBindPluginExtender is a mock of PreBindPluginExtender interface. type MockPreBindPluginExtender struct { ctrl *gomock.Controller recorder *MockPreBindPluginExtenderMockRecorder + isgomock struct{} } // MockPreBindPluginExtenderMockRecorder is the mock recorder for MockPreBindPluginExtender. @@ -647,37 +662,38 @@ func (m *MockPreBindPluginExtender) EXPECT() *MockPreBindPluginExtenderMockRecor } // AfterPreBind mocks base method. -func (m *MockPreBindPluginExtender) AfterPreBind(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 string, arg4 *framework.Status) *framework.Status { +func (m *MockPreBindPluginExtender) AfterPreBind(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodename string, bindResult *framework.Status) *framework.Status { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AfterPreBind", arg0, arg1, arg2, arg3, arg4) + ret := m.ctrl.Call(m, "AfterPreBind", ctx, state, pod, nodename, bindResult) ret0, _ := ret[0].(*framework.Status) return ret0 } // AfterPreBind indicates an expected call of AfterPreBind. -func (mr *MockPreBindPluginExtenderMockRecorder) AfterPreBind(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { +func (mr *MockPreBindPluginExtenderMockRecorder) AfterPreBind(ctx, state, pod, nodename, bindResult any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterPreBind", reflect.TypeOf((*MockPreBindPluginExtender)(nil).AfterPreBind), arg0, arg1, arg2, arg3, arg4) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterPreBind", reflect.TypeOf((*MockPreBindPluginExtender)(nil).AfterPreBind), ctx, state, pod, nodename, bindResult) } // BeforePreBind mocks base method. -func (m *MockPreBindPluginExtender) BeforePreBind(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 string) *framework.Status { +func (m *MockPreBindPluginExtender) BeforePreBind(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodename string) *framework.Status { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BeforePreBind", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "BeforePreBind", ctx, state, pod, nodename) ret0, _ := ret[0].(*framework.Status) return ret0 } // BeforePreBind indicates an expected call of BeforePreBind. -func (mr *MockPreBindPluginExtenderMockRecorder) BeforePreBind(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockPreBindPluginExtenderMockRecorder) BeforePreBind(ctx, state, pod, nodename any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforePreBind", reflect.TypeOf((*MockPreBindPluginExtender)(nil).BeforePreBind), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforePreBind", reflect.TypeOf((*MockPreBindPluginExtender)(nil).BeforePreBind), ctx, state, pod, nodename) } // MockBindPluginExtender is a mock of BindPluginExtender interface. type MockBindPluginExtender struct { ctrl *gomock.Controller recorder *MockBindPluginExtenderMockRecorder + isgomock struct{} } // MockBindPluginExtenderMockRecorder is the mock recorder for MockBindPluginExtender. @@ -698,37 +714,38 @@ func (m *MockBindPluginExtender) EXPECT() *MockBindPluginExtenderMockRecorder { } // AfterBind mocks base method. -func (m *MockBindPluginExtender) AfterBind(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 string, arg4 *framework.Status) *framework.Status { +func (m *MockBindPluginExtender) AfterBind(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodename string, bindResult *framework.Status) *framework.Status { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AfterBind", arg0, arg1, arg2, arg3, arg4) + ret := m.ctrl.Call(m, "AfterBind", ctx, state, pod, nodename, bindResult) ret0, _ := ret[0].(*framework.Status) return ret0 } // AfterBind indicates an expected call of AfterBind. -func (mr *MockBindPluginExtenderMockRecorder) AfterBind(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { +func (mr *MockBindPluginExtenderMockRecorder) AfterBind(ctx, state, pod, nodename, bindResult any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterBind", reflect.TypeOf((*MockBindPluginExtender)(nil).AfterBind), arg0, arg1, arg2, arg3, arg4) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterBind", reflect.TypeOf((*MockBindPluginExtender)(nil).AfterBind), ctx, state, pod, nodename, bindResult) } // BeforeBind mocks base method. -func (m *MockBindPluginExtender) BeforeBind(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 string) *framework.Status { +func (m *MockBindPluginExtender) BeforeBind(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodename string) *framework.Status { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BeforeBind", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "BeforeBind", ctx, state, pod, nodename) ret0, _ := ret[0].(*framework.Status) return ret0 } // BeforeBind indicates an expected call of BeforeBind. -func (mr *MockBindPluginExtenderMockRecorder) BeforeBind(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockBindPluginExtenderMockRecorder) BeforeBind(ctx, state, pod, nodename any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforeBind", reflect.TypeOf((*MockBindPluginExtender)(nil).BeforeBind), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforeBind", reflect.TypeOf((*MockBindPluginExtender)(nil).BeforeBind), ctx, state, pod, nodename) } // MockPostBindPluginExtender is a mock of PostBindPluginExtender interface. type MockPostBindPluginExtender struct { ctrl *gomock.Controller recorder *MockPostBindPluginExtenderMockRecorder + isgomock struct{} } // MockPostBindPluginExtenderMockRecorder is the mock recorder for MockPostBindPluginExtender. @@ -749,27 +766,27 @@ func (m *MockPostBindPluginExtender) EXPECT() *MockPostBindPluginExtenderMockRec } // AfterPostBind mocks base method. -func (m *MockPostBindPluginExtender) AfterPostBind(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 string) { +func (m *MockPostBindPluginExtender) AfterPostBind(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodename string) { m.ctrl.T.Helper() - m.ctrl.Call(m, "AfterPostBind", arg0, arg1, arg2, arg3) + m.ctrl.Call(m, "AfterPostBind", ctx, state, pod, nodename) } // AfterPostBind indicates an expected call of AfterPostBind. -func (mr *MockPostBindPluginExtenderMockRecorder) AfterPostBind(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockPostBindPluginExtenderMockRecorder) AfterPostBind(ctx, state, pod, nodename any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterPostBind", reflect.TypeOf((*MockPostBindPluginExtender)(nil).AfterPostBind), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterPostBind", reflect.TypeOf((*MockPostBindPluginExtender)(nil).AfterPostBind), ctx, state, pod, nodename) } // BeforePostBind mocks base method. -func (m *MockPostBindPluginExtender) BeforePostBind(arg0 context.Context, arg1 *framework.CycleState, arg2 *v1.Pod, arg3 string) *framework.Status { +func (m *MockPostBindPluginExtender) BeforePostBind(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodename string) *framework.Status { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BeforePostBind", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "BeforePostBind", ctx, state, pod, nodename) ret0, _ := ret[0].(*framework.Status) return ret0 } // BeforePostBind indicates an expected call of BeforePostBind. -func (mr *MockPostBindPluginExtenderMockRecorder) BeforePostBind(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockPostBindPluginExtenderMockRecorder) BeforePostBind(ctx, state, pod, nodename any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforePostBind", reflect.TypeOf((*MockPostBindPluginExtender)(nil).BeforePostBind), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforePostBind", reflect.TypeOf((*MockPostBindPluginExtender)(nil).BeforePostBind), ctx, state, pod, nodename) } diff --git a/simulator/scheduler/plugin/wrappedplugin_test.go b/simulator/scheduler/plugin/wrappedplugin_test.go index efeee5752..28a568a72 100644 --- a/simulator/scheduler/plugin/wrappedplugin_test.go +++ b/simulator/scheduler/plugin/wrappedplugin_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" + "go.uber.org/mock/gomock" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" diff --git a/simulator/scheduler/storereflector/mock_storereflector/resultstore.go b/simulator/scheduler/storereflector/mock_storereflector/resultstore.go index ba4d0f2bf..d040645cc 100644 --- a/simulator/scheduler/storereflector/mock_storereflector/resultstore.go +++ b/simulator/scheduler/storereflector/mock_storereflector/resultstore.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: sigs.k8s.io/kube-scheduler-simulator/simulator/scheduler/storereflector (interfaces: ResultStore) +// +// Generated by this command: +// +// mockgen -destination=./mock_storereflector/resultstore.go . ResultStore +// // Package mock_storereflector is a generated GoMock package. package mock_storereflector @@ -7,7 +12,7 @@ package mock_storereflector import ( reflect "reflect" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" v1 "k8s.io/api/core/v1" ) @@ -15,6 +20,7 @@ import ( type MockResultStore struct { ctrl *gomock.Controller recorder *MockResultStoreMockRecorder + isgomock struct{} } // MockResultStoreMockRecorder is the mock recorder for MockResultStore. @@ -35,27 +41,27 @@ func (m *MockResultStore) EXPECT() *MockResultStoreMockRecorder { } // DeleteData mocks base method. -func (m *MockResultStore) DeleteData(arg0 v1.Pod) { +func (m *MockResultStore) DeleteData(key v1.Pod) { m.ctrl.T.Helper() - m.ctrl.Call(m, "DeleteData", arg0) + m.ctrl.Call(m, "DeleteData", key) } // DeleteData indicates an expected call of DeleteData. -func (mr *MockResultStoreMockRecorder) DeleteData(arg0 interface{}) *gomock.Call { +func (mr *MockResultStoreMockRecorder) DeleteData(key any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteData", reflect.TypeOf((*MockResultStore)(nil).DeleteData), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteData", reflect.TypeOf((*MockResultStore)(nil).DeleteData), key) } // GetStoredResult mocks base method. -func (m *MockResultStore) GetStoredResult(arg0 *v1.Pod) map[string]string { +func (m *MockResultStore) GetStoredResult(pod *v1.Pod) map[string]string { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetStoredResult", arg0) + ret := m.ctrl.Call(m, "GetStoredResult", pod) ret0, _ := ret[0].(map[string]string) return ret0 } // GetStoredResult indicates an expected call of GetStoredResult. -func (mr *MockResultStoreMockRecorder) GetStoredResult(arg0 interface{}) *gomock.Call { +func (mr *MockResultStoreMockRecorder) GetStoredResult(pod any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoredResult", reflect.TypeOf((*MockResultStore)(nil).GetStoredResult), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoredResult", reflect.TypeOf((*MockResultStore)(nil).GetStoredResult), pod) } diff --git a/simulator/scheduler/storereflector/storereflector_test.go b/simulator/scheduler/storereflector/storereflector_test.go index e5c5dbae7..994f6d5f2 100644 --- a/simulator/scheduler/storereflector/storereflector_test.go +++ b/simulator/scheduler/storereflector/storereflector_test.go @@ -5,9 +5,9 @@ import ( "fmt" "testing" - "github.com/golang/mock/gomock" "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/assert" + "go.uber.org/mock/gomock" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes/fake" diff --git a/simulator/snapshot/mock_snapshot/scheduler.go b/simulator/snapshot/mock_snapshot/scheduler.go index bb6cf19f4..b9fbd8f4f 100644 --- a/simulator/snapshot/mock_snapshot/scheduler.go +++ b/simulator/snapshot/mock_snapshot/scheduler.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: sigs.k8s.io/kube-scheduler-simulator/simulator/snapshot (interfaces: SchedulerService) +// +// Generated by this command: +// +// mockgen -destination=./mock_snapshot/scheduler.go . SchedulerService +// // Package mock_snapshot is a generated GoMock package. package mock_snapshot @@ -7,7 +12,7 @@ package mock_snapshot import ( reflect "reflect" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" v1 "k8s.io/kube-scheduler/config/v1" ) @@ -15,6 +20,7 @@ import ( type MockSchedulerService struct { ctrl *gomock.Controller recorder *MockSchedulerServiceMockRecorder + isgomock struct{} } // MockSchedulerServiceMockRecorder is the mock recorder for MockSchedulerService. @@ -50,15 +56,15 @@ func (mr *MockSchedulerServiceMockRecorder) GetSchedulerConfig() *gomock.Call { } // RestartScheduler mocks base method. -func (m *MockSchedulerService) RestartScheduler(arg0 *v1.KubeSchedulerConfiguration) error { +func (m *MockSchedulerService) RestartScheduler(cfg *v1.KubeSchedulerConfiguration) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RestartScheduler", arg0) + ret := m.ctrl.Call(m, "RestartScheduler", cfg) ret0, _ := ret[0].(error) return ret0 } // RestartScheduler indicates an expected call of RestartScheduler. -func (mr *MockSchedulerServiceMockRecorder) RestartScheduler(arg0 interface{}) *gomock.Call { +func (mr *MockSchedulerServiceMockRecorder) RestartScheduler(cfg any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RestartScheduler", reflect.TypeOf((*MockSchedulerService)(nil).RestartScheduler), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RestartScheduler", reflect.TypeOf((*MockSchedulerService)(nil).RestartScheduler), cfg) } diff --git a/simulator/snapshot/snapshot_test.go b/simulator/snapshot/snapshot_test.go index de6c3c5dd..584a76bb7 100644 --- a/simulator/snapshot/snapshot_test.go +++ b/simulator/snapshot/snapshot_test.go @@ -6,9 +6,9 @@ import ( "strings" "testing" - "github.com/golang/mock/gomock" "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/assert" + "go.uber.org/mock/gomock" "golang.org/x/xerrors" corev1 "k8s.io/api/core/v1" schedulingv1 "k8s.io/api/scheduling/v1"