/
command_command.go
173 lines (145 loc) · 4.98 KB
/
command_command.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/runfinch/finch/pkg/command (interfaces: Command)
// Package mocks is a generated GoMock package.
package mocks
import (
io "io"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
)
// Command is a mock of Command interface.
type Command struct {
ctrl *gomock.Controller
recorder *CommandMockRecorder
}
// CommandMockRecorder is the mock recorder for Command.
type CommandMockRecorder struct {
mock *Command
}
// NewCommand creates a new mock instance.
func NewCommand(ctrl *gomock.Controller) *Command {
mock := &Command{ctrl: ctrl}
mock.recorder = &CommandMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *Command) EXPECT() *CommandMockRecorder {
return m.recorder
}
// CombinedOutput mocks base method.
func (m *Command) CombinedOutput() ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CombinedOutput")
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CombinedOutput indicates an expected call of CombinedOutput.
func (mr *CommandMockRecorder) CombinedOutput() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CombinedOutput", reflect.TypeOf((*Command)(nil).CombinedOutput))
}
// Output mocks base method.
func (m *Command) Output() ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Output")
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Output indicates an expected call of Output.
func (mr *CommandMockRecorder) Output() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Output", reflect.TypeOf((*Command)(nil).Output))
}
// Run mocks base method.
func (m *Command) Run() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Run")
ret0, _ := ret[0].(error)
return ret0
}
// Run indicates an expected call of Run.
func (mr *CommandMockRecorder) Run() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*Command)(nil).Run))
}
// SetEnv mocks base method.
func (m *Command) SetEnv(arg0 []string) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetEnv", arg0)
}
// SetEnv indicates an expected call of SetEnv.
func (mr *CommandMockRecorder) SetEnv(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetEnv", reflect.TypeOf((*Command)(nil).SetEnv), arg0)
}
// SetStderr mocks base method.
func (m *Command) SetStderr(arg0 io.Writer) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetStderr", arg0)
}
// SetStderr indicates an expected call of SetStderr.
func (mr *CommandMockRecorder) SetStderr(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStderr", reflect.TypeOf((*Command)(nil).SetStderr), arg0)
}
// SetStdin mocks base method.
func (m *Command) SetStdin(arg0 io.Reader) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetStdin", arg0)
}
// SetStdin indicates an expected call of SetStdin.
func (mr *CommandMockRecorder) SetStdin(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStdin", reflect.TypeOf((*Command)(nil).SetStdin), arg0)
}
// SetStdout mocks base method.
func (m *Command) SetStdout(arg0 io.Writer) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetStdout", arg0)
}
// SetStdout indicates an expected call of SetStdout.
func (mr *CommandMockRecorder) SetStdout(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStdout", reflect.TypeOf((*Command)(nil).SetStdout), arg0)
}
// Start mocks base method.
func (m *Command) Start() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Start")
ret0, _ := ret[0].(error)
return ret0
}
// Start indicates an expected call of Start.
func (mr *CommandMockRecorder) Start() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*Command)(nil).Start))
}
// StdinPipe mocks base method.
func (m *Command) StdinPipe() (io.WriteCloser, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StdinPipe")
ret0, _ := ret[0].(io.WriteCloser)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StdinPipe indicates an expected call of StdinPipe.
func (mr *CommandMockRecorder) StdinPipe() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StdinPipe", reflect.TypeOf((*Command)(nil).StdinPipe))
}
// Wait mocks base method.
func (m *Command) Wait() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Wait")
ret0, _ := ret[0].(error)
return ret0
}
// Wait indicates an expected call of Wait.
func (mr *CommandMockRecorder) Wait() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*Command)(nil).Wait))
}