Files
odo/pkg/dev/mock.go
Philippe Martin 330b724753 Add an odo run command to manually execute command during odo dev (#6857)
* Add a run command

* Check command name passed as arg

* Check platform is available

* Add a Run method to the DevClient

* Run command on cluster

* Add test with run command on cluster

* Implement and test run on podman

* Enhance test to check that command has been executed in container

* Fix `odo help` test

* Refactor common code for podman/cluster

* Test Apply commands on Kubernetes/Images

* Test  a msg is displayed when executing odo run without odo dev

* Review

* makes GetRunningPodFromSelector return only Running pods on Podman
2023-06-02 09:33:21 -04:00

79 lines
2.3 KiB
Go
Generated

// Code generated by MockGen. DO NOT EDIT.
// Source: pkg/dev/interface.go
// Package dev is a generated GoMock package.
package dev
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
}
// CleanupResources mocks base method.
func (m *MockClient) CleanupResources(ctx context.Context, out io.Writer) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CleanupResources", ctx, out)
ret0, _ := ret[0].(error)
return ret0
}
// CleanupResources indicates an expected call of CleanupResources.
func (mr *MockClientMockRecorder) CleanupResources(ctx, out interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CleanupResources", reflect.TypeOf((*MockClient)(nil).CleanupResources), ctx, out)
}
// Run mocks base method.
func (m *MockClient) Run(ctx context.Context, commandName string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Run", ctx, commandName)
ret0, _ := ret[0].(error)
return ret0
}
// Run indicates an expected call of Run.
func (mr *MockClientMockRecorder) Run(ctx, commandName interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockClient)(nil).Run), ctx, commandName)
}
// Start mocks base method.
func (m *MockClient) Start(ctx context.Context, options StartOptions) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Start", ctx, options)
ret0, _ := ret[0].(error)
return ret0
}
// Start indicates an expected call of Start.
func (mr *MockClientMockRecorder) Start(ctx, options interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockClient)(nil).Start), ctx, options)
}