forked from cloudfoundry/bosh-agent
-
Notifications
You must be signed in to change notification settings - Fork 1
/
fake_script_params.go
197 lines (175 loc) · 5.36 KB
/
fake_script_params.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
// This file was generated by counterfeiter
package fakes
import (
"sync"
"github.com/cloudfoundry/bosh-agent/agent/script/drain"
)
type FakeScriptParams struct {
JobChangeStub func() (change string)
jobChangeMutex sync.RWMutex
jobChangeArgsForCall []struct{}
jobChangeReturns struct {
result1 string
}
HashChangeStub func() (change string)
hashChangeMutex sync.RWMutex
hashChangeArgsForCall []struct{}
hashChangeReturns struct {
result1 string
}
UpdatedPackagesStub func() (pkgs []string)
updatedPackagesMutex sync.RWMutex
updatedPackagesArgsForCall []struct{}
updatedPackagesReturns struct {
result1 []string
}
JobStateStub func() (string, error)
jobStateMutex sync.RWMutex
jobStateArgsForCall []struct{}
jobStateReturns struct {
result1 string
result2 error
}
JobNextStateStub func() (string, error)
jobNextStateMutex sync.RWMutex
jobNextStateArgsForCall []struct{}
jobNextStateReturns struct {
result1 string
result2 error
}
ToStatusParamsStub func() drain.ScriptParams
toStatusParamsMutex sync.RWMutex
toStatusParamsArgsForCall []struct{}
toStatusParamsReturns struct {
result1 drain.ScriptParams
}
}
func (fake *FakeScriptParams) JobChange() (change string) {
fake.jobChangeMutex.Lock()
fake.jobChangeArgsForCall = append(fake.jobChangeArgsForCall, struct{}{})
fake.jobChangeMutex.Unlock()
if fake.JobChangeStub != nil {
return fake.JobChangeStub()
} else {
return fake.jobChangeReturns.result1
}
}
func (fake *FakeScriptParams) JobChangeCallCount() int {
fake.jobChangeMutex.RLock()
defer fake.jobChangeMutex.RUnlock()
return len(fake.jobChangeArgsForCall)
}
func (fake *FakeScriptParams) JobChangeReturns(result1 string) {
fake.JobChangeStub = nil
fake.jobChangeReturns = struct {
result1 string
}{result1}
}
func (fake *FakeScriptParams) HashChange() (change string) {
fake.hashChangeMutex.Lock()
fake.hashChangeArgsForCall = append(fake.hashChangeArgsForCall, struct{}{})
fake.hashChangeMutex.Unlock()
if fake.HashChangeStub != nil {
return fake.HashChangeStub()
} else {
return fake.hashChangeReturns.result1
}
}
func (fake *FakeScriptParams) HashChangeCallCount() int {
fake.hashChangeMutex.RLock()
defer fake.hashChangeMutex.RUnlock()
return len(fake.hashChangeArgsForCall)
}
func (fake *FakeScriptParams) HashChangeReturns(result1 string) {
fake.HashChangeStub = nil
fake.hashChangeReturns = struct {
result1 string
}{result1}
}
func (fake *FakeScriptParams) UpdatedPackages() (pkgs []string) {
fake.updatedPackagesMutex.Lock()
fake.updatedPackagesArgsForCall = append(fake.updatedPackagesArgsForCall, struct{}{})
fake.updatedPackagesMutex.Unlock()
if fake.UpdatedPackagesStub != nil {
return fake.UpdatedPackagesStub()
} else {
return fake.updatedPackagesReturns.result1
}
}
func (fake *FakeScriptParams) UpdatedPackagesCallCount() int {
fake.updatedPackagesMutex.RLock()
defer fake.updatedPackagesMutex.RUnlock()
return len(fake.updatedPackagesArgsForCall)
}
func (fake *FakeScriptParams) UpdatedPackagesReturns(result1 []string) {
fake.UpdatedPackagesStub = nil
fake.updatedPackagesReturns = struct {
result1 []string
}{result1}
}
func (fake *FakeScriptParams) JobState() (string, error) {
fake.jobStateMutex.Lock()
fake.jobStateArgsForCall = append(fake.jobStateArgsForCall, struct{}{})
fake.jobStateMutex.Unlock()
if fake.JobStateStub != nil {
return fake.JobStateStub()
} else {
return fake.jobStateReturns.result1, fake.jobStateReturns.result2
}
}
func (fake *FakeScriptParams) JobStateCallCount() int {
fake.jobStateMutex.RLock()
defer fake.jobStateMutex.RUnlock()
return len(fake.jobStateArgsForCall)
}
func (fake *FakeScriptParams) JobStateReturns(result1 string, result2 error) {
fake.JobStateStub = nil
fake.jobStateReturns = struct {
result1 string
result2 error
}{result1, result2}
}
func (fake *FakeScriptParams) JobNextState() (string, error) {
fake.jobNextStateMutex.Lock()
fake.jobNextStateArgsForCall = append(fake.jobNextStateArgsForCall, struct{}{})
fake.jobNextStateMutex.Unlock()
if fake.JobNextStateStub != nil {
return fake.JobNextStateStub()
} else {
return fake.jobNextStateReturns.result1, fake.jobNextStateReturns.result2
}
}
func (fake *FakeScriptParams) JobNextStateCallCount() int {
fake.jobNextStateMutex.RLock()
defer fake.jobNextStateMutex.RUnlock()
return len(fake.jobNextStateArgsForCall)
}
func (fake *FakeScriptParams) JobNextStateReturns(result1 string, result2 error) {
fake.JobNextStateStub = nil
fake.jobNextStateReturns = struct {
result1 string
result2 error
}{result1, result2}
}
func (fake *FakeScriptParams) ToStatusParams() drain.ScriptParams {
fake.toStatusParamsMutex.Lock()
fake.toStatusParamsArgsForCall = append(fake.toStatusParamsArgsForCall, struct{}{})
fake.toStatusParamsMutex.Unlock()
if fake.ToStatusParamsStub != nil {
return fake.ToStatusParamsStub()
} else {
return fake.toStatusParamsReturns.result1
}
}
func (fake *FakeScriptParams) ToStatusParamsCallCount() int {
fake.toStatusParamsMutex.RLock()
defer fake.toStatusParamsMutex.RUnlock()
return len(fake.toStatusParamsArgsForCall)
}
func (fake *FakeScriptParams) ToStatusParamsReturns(result1 drain.ScriptParams) {
fake.ToStatusParamsStub = nil
fake.toStatusParamsReturns = struct {
result1 drain.ScriptParams
}{result1}
}
var _ drain.ScriptParams = new(FakeScriptParams)