Files
coldWaterandGitHub 6fee7e0e48 Replace already closed github.com/golang/mock with go.uber.org/mock (#2357)
* replace gomock

Signed-off-by: forsaken628 <[email protected]>

* fix

Signed-off-by: forsaken628 <[email protected]>

* revert

Signed-off-by: forsaken628 <[email protected]>

* fix

Signed-off-by: forsaken628 <[email protected]>

* fix

Signed-off-by: forsaken628 <[email protected]>

---------

Signed-off-by: forsaken628 <[email protected]>
2024-06-14 13:54:09 +00:00

103 lines
4.2 KiB
Go

// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/kubeflow/katib/pkg/apis/manager/v1beta1 (interfaces: EarlyStoppingClient)
//
// Generated by this command:
//
// mockgen -package mock -destination pkg/mock/v1beta1/api/earlystopping.go github.com/kubeflow/katib/pkg/apis/manager/v1beta1 EarlyStoppingClient
//
// Package mock is a generated GoMock package.
package mock
import (
context "context"
reflect "reflect"
api_v1_beta1 "github.com/kubeflow/katib/pkg/apis/manager/v1beta1"
gomock "go.uber.org/mock/gomock"
grpc "google.golang.org/grpc"
)
// MockEarlyStoppingClient is a mock of EarlyStoppingClient interface.
type MockEarlyStoppingClient struct {
ctrl *gomock.Controller
recorder *MockEarlyStoppingClientMockRecorder
}
// MockEarlyStoppingClientMockRecorder is the mock recorder for MockEarlyStoppingClient.
type MockEarlyStoppingClientMockRecorder struct {
mock *MockEarlyStoppingClient
}
// NewMockEarlyStoppingClient creates a new mock instance.
func NewMockEarlyStoppingClient(ctrl *gomock.Controller) *MockEarlyStoppingClient {
mock := &MockEarlyStoppingClient{ctrl: ctrl}
mock.recorder = &MockEarlyStoppingClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockEarlyStoppingClient) EXPECT() *MockEarlyStoppingClientMockRecorder {
return m.recorder
}
// GetEarlyStoppingRules mocks base method.
func (m *MockEarlyStoppingClient) GetEarlyStoppingRules(arg0 context.Context, arg1 *api_v1_beta1.GetEarlyStoppingRulesRequest, arg2 ...grpc.CallOption) (*api_v1_beta1.GetEarlyStoppingRulesReply, error) {
m.ctrl.T.Helper()
varargs := []any{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetEarlyStoppingRules", varargs...)
ret0, _ := ret[0].(*api_v1_beta1.GetEarlyStoppingRulesReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetEarlyStoppingRules indicates an expected call of GetEarlyStoppingRules.
func (mr *MockEarlyStoppingClientMockRecorder) GetEarlyStoppingRules(arg0, arg1 any, arg2 ...any) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]any{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEarlyStoppingRules", reflect.TypeOf((*MockEarlyStoppingClient)(nil).GetEarlyStoppingRules), varargs...)
}
// SetTrialStatus mocks base method.
func (m *MockEarlyStoppingClient) SetTrialStatus(arg0 context.Context, arg1 *api_v1_beta1.SetTrialStatusRequest, arg2 ...grpc.CallOption) (*api_v1_beta1.SetTrialStatusReply, error) {
m.ctrl.T.Helper()
varargs := []any{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "SetTrialStatus", varargs...)
ret0, _ := ret[0].(*api_v1_beta1.SetTrialStatusReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SetTrialStatus indicates an expected call of SetTrialStatus.
func (mr *MockEarlyStoppingClientMockRecorder) SetTrialStatus(arg0, arg1 any, arg2 ...any) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]any{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTrialStatus", reflect.TypeOf((*MockEarlyStoppingClient)(nil).SetTrialStatus), varargs...)
}
// ValidateEarlyStoppingSettings mocks base method.
func (m *MockEarlyStoppingClient) ValidateEarlyStoppingSettings(arg0 context.Context, arg1 *api_v1_beta1.ValidateEarlyStoppingSettingsRequest, arg2 ...grpc.CallOption) (*api_v1_beta1.ValidateEarlyStoppingSettingsReply, error) {
m.ctrl.T.Helper()
varargs := []any{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "ValidateEarlyStoppingSettings", varargs...)
ret0, _ := ret[0].(*api_v1_beta1.ValidateEarlyStoppingSettingsReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ValidateEarlyStoppingSettings indicates an expected call of ValidateEarlyStoppingSettings.
func (mr *MockEarlyStoppingClientMockRecorder) ValidateEarlyStoppingSettings(arg0, arg1 any, arg2 ...any) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]any{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateEarlyStoppingSettings", reflect.TypeOf((*MockEarlyStoppingClient)(nil).ValidateEarlyStoppingSettings), varargs...)
}