// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "time" "github.com/bnema/gordon/internal/domain" mock "github.com/stretchr/testify/mock" ) // NewMockContainerLogStreamer creates a new instance of MockContainerLogStreamer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewMockContainerLogStreamer(t interface { mock.TestingT Cleanup(func()) }) *MockContainerLogStreamer { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MockContainerLogStreamer{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MockContainerLogStreamer is an autogenerated mock type for the ContainerLogStreamer type type MockContainerLogStreamer struct { mock.Mock } type MockContainerLogStreamer_Expecter struct { mock *mock.Mock } func (_m *MockContainerLogStreamer) EXPECT() *MockContainerLogStreamer_Expecter { return &MockContainerLogStreamer_Expecter{mock: &_m.Mock} } // StreamContainerLogs provides a mock function for the type MockContainerLogStreamer func (_mock *MockContainerLogStreamer) StreamContainerLogs(ctx context.Context, containerID string, since time.Time, emit func(domain.ContainerLogLine)) error { ret := _mock.Called(ctx, containerID, since, emit) if len(ret) == 0 { panic("no return value specified for StreamContainerLogs") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, time.Time, func(domain.ContainerLogLine)) error); ok { r0 = returnFunc(ctx, containerID, since, emit) } else { r0 = ret.Error(0) } return r0 } // MockContainerLogStreamer_StreamContainerLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StreamContainerLogs' type MockContainerLogStreamer_StreamContainerLogs_Call struct { *mock.Call } // StreamContainerLogs is a helper method to define mock.On call // - ctx context.Context // - containerID string // - since time.Time // - emit func(domain.ContainerLogLine) func (_e *MockContainerLogStreamer_Expecter) StreamContainerLogs(ctx any, containerID any, since any, emit any) *MockContainerLogStreamer_StreamContainerLogs_Call { return &MockContainerLogStreamer_StreamContainerLogs_Call{Call: _e.mock.On("StreamContainerLogs", ctx, containerID, since, emit)} } func (_c *MockContainerLogStreamer_StreamContainerLogs_Call) Run(run func(ctx context.Context, containerID string, since time.Time, emit func(domain.ContainerLogLine))) *MockContainerLogStreamer_StreamContainerLogs_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } var arg2 time.Time if args[2] != nil { arg2 = args[2].(time.Time) } var arg3 func(domain.ContainerLogLine) if args[3] != nil { arg3 = args[3].(func(domain.ContainerLogLine)) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *MockContainerLogStreamer_StreamContainerLogs_Call) Return(err error) *MockContainerLogStreamer_StreamContainerLogs_Call { _c.Call.Return(err) return _c } func (_c *MockContainerLogStreamer_StreamContainerLogs_Call) RunAndReturn(run func(ctx context.Context, containerID string, since time.Time, emit func(domain.ContainerLogLine)) error) *MockContainerLogStreamer_StreamContainerLogs_Call { _c.Call.Return(run) return _c }