mock/ssh/mock_ssh_client_interface.go (63 lines of code) (raw):

// Code generated by mockery v2.16.0. DO NOT EDIT. package mock import ( clientssh "github.com/epam/edp-gerrit-operator/v2/pkg/client/ssh" mock "github.com/stretchr/testify/mock" ssh "golang.org/x/crypto/ssh" ) // SSHClientInterface is an autogenerated mock type for the SSHClientInterface type type SSHClientInterface struct { mock.Mock } // NewSession provides a mock function with given fields: func (_m *SSHClientInterface) NewSession() (*ssh.Session, *ssh.Client, error) { ret := _m.Called() var r0 *ssh.Session if rf, ok := ret.Get(0).(func() *ssh.Session); ok { r0 = rf() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*ssh.Session) } } var r1 *ssh.Client if rf, ok := ret.Get(1).(func() *ssh.Client); ok { r1 = rf() } else { if ret.Get(1) != nil { r1 = ret.Get(1).(*ssh.Client) } } var r2 error if rf, ok := ret.Get(2).(func() error); ok { r2 = rf() } else { r2 = ret.Error(2) } return r0, r1, r2 } // RunCommand provides a mock function with given fields: cmd func (_m *SSHClientInterface) RunCommand(cmd *clientssh.SSHCommand) ([]byte, error) { ret := _m.Called(cmd) var r0 []byte if rf, ok := ret.Get(0).(func(*clientssh.SSHCommand) []byte); ok { r0 = rf(cmd) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]byte) } } var r1 error if rf, ok := ret.Get(1).(func(*clientssh.SSHCommand) error); ok { r1 = rf(cmd) } else { r1 = ret.Error(1) } return r0, r1 } type mockConstructorTestingTNewSSHClientInterface interface { mock.TestingT Cleanup(func()) } // NewSSHClientInterface creates a new instance of SSHClientInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. func NewSSHClientInterface(t mockConstructorTestingTNewSSHClientInterface) *SSHClientInterface { mock := &SSHClientInterface{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock }