forked from vmware-archive/atc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_build_delegate.go
215 lines (194 loc) · 6.96 KB
/
fake_build_delegate.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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
// This file was generated by counterfeiter
package enginefakes
import (
"sync"
"code.cloudfoundry.org/lager"
"github.com/concourse/atc"
"github.com/concourse/atc/engine"
"github.com/concourse/atc/event"
"github.com/concourse/atc/exec"
)
type FakeBuildDelegate struct {
InputDelegateStub func(lager.Logger, atc.GetPlan, event.OriginID) exec.GetDelegate
inputDelegateMutex sync.RWMutex
inputDelegateArgsForCall []struct {
arg1 lager.Logger
arg2 atc.GetPlan
arg3 event.OriginID
}
inputDelegateReturns struct {
result1 exec.GetDelegate
}
ExecutionDelegateStub func(lager.Logger, atc.TaskPlan, event.OriginID) exec.TaskDelegate
executionDelegateMutex sync.RWMutex
executionDelegateArgsForCall []struct {
arg1 lager.Logger
arg2 atc.TaskPlan
arg3 event.OriginID
}
executionDelegateReturns struct {
result1 exec.TaskDelegate
}
OutputDelegateStub func(lager.Logger, atc.PutPlan, event.OriginID) exec.PutDelegate
outputDelegateMutex sync.RWMutex
outputDelegateArgsForCall []struct {
arg1 lager.Logger
arg2 atc.PutPlan
arg3 event.OriginID
}
outputDelegateReturns struct {
result1 exec.PutDelegate
}
FinishStub func(lager.Logger, error, exec.Success, bool)
finishMutex sync.RWMutex
finishArgsForCall []struct {
arg1 lager.Logger
arg2 error
arg3 exec.Success
arg4 bool
}
invocations map[string][][]interface{}
invocationsMutex sync.RWMutex
}
func (fake *FakeBuildDelegate) InputDelegate(arg1 lager.Logger, arg2 atc.GetPlan, arg3 event.OriginID) exec.GetDelegate {
fake.inputDelegateMutex.Lock()
fake.inputDelegateArgsForCall = append(fake.inputDelegateArgsForCall, struct {
arg1 lager.Logger
arg2 atc.GetPlan
arg3 event.OriginID
}{arg1, arg2, arg3})
fake.recordInvocation("InputDelegate", []interface{}{arg1, arg2, arg3})
fake.inputDelegateMutex.Unlock()
if fake.InputDelegateStub != nil {
return fake.InputDelegateStub(arg1, arg2, arg3)
} else {
return fake.inputDelegateReturns.result1
}
}
func (fake *FakeBuildDelegate) InputDelegateCallCount() int {
fake.inputDelegateMutex.RLock()
defer fake.inputDelegateMutex.RUnlock()
return len(fake.inputDelegateArgsForCall)
}
func (fake *FakeBuildDelegate) InputDelegateArgsForCall(i int) (lager.Logger, atc.GetPlan, event.OriginID) {
fake.inputDelegateMutex.RLock()
defer fake.inputDelegateMutex.RUnlock()
return fake.inputDelegateArgsForCall[i].arg1, fake.inputDelegateArgsForCall[i].arg2, fake.inputDelegateArgsForCall[i].arg3
}
func (fake *FakeBuildDelegate) InputDelegateReturns(result1 exec.GetDelegate) {
fake.InputDelegateStub = nil
fake.inputDelegateReturns = struct {
result1 exec.GetDelegate
}{result1}
}
func (fake *FakeBuildDelegate) ExecutionDelegate(arg1 lager.Logger, arg2 atc.TaskPlan, arg3 event.OriginID) exec.TaskDelegate {
fake.executionDelegateMutex.Lock()
fake.executionDelegateArgsForCall = append(fake.executionDelegateArgsForCall, struct {
arg1 lager.Logger
arg2 atc.TaskPlan
arg3 event.OriginID
}{arg1, arg2, arg3})
fake.recordInvocation("ExecutionDelegate", []interface{}{arg1, arg2, arg3})
fake.executionDelegateMutex.Unlock()
if fake.ExecutionDelegateStub != nil {
return fake.ExecutionDelegateStub(arg1, arg2, arg3)
} else {
return fake.executionDelegateReturns.result1
}
}
func (fake *FakeBuildDelegate) ExecutionDelegateCallCount() int {
fake.executionDelegateMutex.RLock()
defer fake.executionDelegateMutex.RUnlock()
return len(fake.executionDelegateArgsForCall)
}
func (fake *FakeBuildDelegate) ExecutionDelegateArgsForCall(i int) (lager.Logger, atc.TaskPlan, event.OriginID) {
fake.executionDelegateMutex.RLock()
defer fake.executionDelegateMutex.RUnlock()
return fake.executionDelegateArgsForCall[i].arg1, fake.executionDelegateArgsForCall[i].arg2, fake.executionDelegateArgsForCall[i].arg3
}
func (fake *FakeBuildDelegate) ExecutionDelegateReturns(result1 exec.TaskDelegate) {
fake.ExecutionDelegateStub = nil
fake.executionDelegateReturns = struct {
result1 exec.TaskDelegate
}{result1}
}
func (fake *FakeBuildDelegate) OutputDelegate(arg1 lager.Logger, arg2 atc.PutPlan, arg3 event.OriginID) exec.PutDelegate {
fake.outputDelegateMutex.Lock()
fake.outputDelegateArgsForCall = append(fake.outputDelegateArgsForCall, struct {
arg1 lager.Logger
arg2 atc.PutPlan
arg3 event.OriginID
}{arg1, arg2, arg3})
fake.recordInvocation("OutputDelegate", []interface{}{arg1, arg2, arg3})
fake.outputDelegateMutex.Unlock()
if fake.OutputDelegateStub != nil {
return fake.OutputDelegateStub(arg1, arg2, arg3)
} else {
return fake.outputDelegateReturns.result1
}
}
func (fake *FakeBuildDelegate) OutputDelegateCallCount() int {
fake.outputDelegateMutex.RLock()
defer fake.outputDelegateMutex.RUnlock()
return len(fake.outputDelegateArgsForCall)
}
func (fake *FakeBuildDelegate) OutputDelegateArgsForCall(i int) (lager.Logger, atc.PutPlan, event.OriginID) {
fake.outputDelegateMutex.RLock()
defer fake.outputDelegateMutex.RUnlock()
return fake.outputDelegateArgsForCall[i].arg1, fake.outputDelegateArgsForCall[i].arg2, fake.outputDelegateArgsForCall[i].arg3
}
func (fake *FakeBuildDelegate) OutputDelegateReturns(result1 exec.PutDelegate) {
fake.OutputDelegateStub = nil
fake.outputDelegateReturns = struct {
result1 exec.PutDelegate
}{result1}
}
func (fake *FakeBuildDelegate) Finish(arg1 lager.Logger, arg2 error, arg3 exec.Success, arg4 bool) {
fake.finishMutex.Lock()
fake.finishArgsForCall = append(fake.finishArgsForCall, struct {
arg1 lager.Logger
arg2 error
arg3 exec.Success
arg4 bool
}{arg1, arg2, arg3, arg4})
fake.recordInvocation("Finish", []interface{}{arg1, arg2, arg3, arg4})
fake.finishMutex.Unlock()
if fake.FinishStub != nil {
fake.FinishStub(arg1, arg2, arg3, arg4)
}
}
func (fake *FakeBuildDelegate) FinishCallCount() int {
fake.finishMutex.RLock()
defer fake.finishMutex.RUnlock()
return len(fake.finishArgsForCall)
}
func (fake *FakeBuildDelegate) FinishArgsForCall(i int) (lager.Logger, error, exec.Success, bool) {
fake.finishMutex.RLock()
defer fake.finishMutex.RUnlock()
return fake.finishArgsForCall[i].arg1, fake.finishArgsForCall[i].arg2, fake.finishArgsForCall[i].arg3, fake.finishArgsForCall[i].arg4
}
func (fake *FakeBuildDelegate) Invocations() map[string][][]interface{} {
fake.invocationsMutex.RLock()
defer fake.invocationsMutex.RUnlock()
fake.inputDelegateMutex.RLock()
defer fake.inputDelegateMutex.RUnlock()
fake.executionDelegateMutex.RLock()
defer fake.executionDelegateMutex.RUnlock()
fake.outputDelegateMutex.RLock()
defer fake.outputDelegateMutex.RUnlock()
fake.finishMutex.RLock()
defer fake.finishMutex.RUnlock()
return fake.invocations
}
func (fake *FakeBuildDelegate) recordInvocation(key string, args []interface{}) {
fake.invocationsMutex.Lock()
defer fake.invocationsMutex.Unlock()
if fake.invocations == nil {
fake.invocations = map[string][][]interface{}{}
}
if fake.invocations[key] == nil {
fake.invocations[key] = [][]interface{}{}
}
fake.invocations[key] = append(fake.invocations[key], args)
}
var _ engine.BuildDelegate = new(FakeBuildDelegate)