Files
odo/pkg/exec/mock.go
Armel Soro 4bab9285fb Allow to cancel execution of odo dev at any phase (e.g. if build command is taking long) (#6736)
* Add test cases simulating build or run commands that take very long

* Pass a context around to relevant functions and methods

This will allow to handle cancellations and timeouts and deadlines as needed

* Pass the context to Podman exec command too

* fixup! Add test cases simulating build or run commands that take very long
2023-04-20 17:12:28 +00:00

53 lines
1.7 KiB
Go
Generated

// Code generated by MockGen. DO NOT EDIT.
// Source: pkg/exec/interface.go
// Package exec is a generated GoMock package.
package exec
import (
context "context"
io "io"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
)
// MockClient is a mock of Client interface.
type MockClient struct {
ctrl *gomock.Controller
recorder *MockClientMockRecorder
}
// MockClientMockRecorder is the mock recorder for MockClient.
type MockClientMockRecorder struct {
mock *MockClient
}
// NewMockClient creates a new mock instance.
func NewMockClient(ctrl *gomock.Controller) *MockClient {
mock := &MockClient{ctrl: ctrl}
mock.recorder = &MockClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockClient) EXPECT() *MockClientMockRecorder {
return m.recorder
}
// ExecuteCommand mocks base method.
func (m *MockClient) ExecuteCommand(ctx context.Context, command []string, podName, containerName string, show bool, stdoutWriter, stderrWriter *io.PipeWriter) ([]string, []string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ExecuteCommand", ctx, command, podName, containerName, show, stdoutWriter, stderrWriter)
ret0, _ := ret[0].([]string)
ret1, _ := ret[1].([]string)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// ExecuteCommand indicates an expected call of ExecuteCommand.
func (mr *MockClientMockRecorder) ExecuteCommand(ctx, command, podName, containerName, show, stdoutWriter, stderrWriter interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecuteCommand", reflect.TypeOf((*MockClient)(nil).ExecuteCommand), ctx, command, podName, containerName, show, stdoutWriter, stderrWriter)
}