-
Notifications
You must be signed in to change notification settings - Fork 161
/
fake_blobs_dir.go
220 lines (196 loc) · 5.55 KB
/
fake_blobs_dir.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
216
217
218
219
220
// This file was generated by counterfeiter
package fakes
import (
"io"
"sync"
"github.com/cloudfoundry/bosh-cli/releasedir"
)
type FakeBlobsDir struct {
InitStub func() error
initMutex sync.RWMutex
initArgsForCall []struct{}
initReturns struct {
result1 error
}
BlobsStub func() ([]releasedir.Blob, error)
blobsMutex sync.RWMutex
blobsArgsForCall []struct{}
blobsReturns struct {
result1 []releasedir.Blob
result2 error
}
DownloadBlobsStub func() error
downloadBlobsMutex sync.RWMutex
downloadBlobsArgsForCall []struct{}
downloadBlobsReturns struct {
result1 error
}
UploadBlobsStub func() error
uploadBlobsMutex sync.RWMutex
uploadBlobsArgsForCall []struct{}
uploadBlobsReturns struct {
result1 error
}
TrackBlobStub func(string, io.ReadCloser) (releasedir.Blob, error)
trackBlobMutex sync.RWMutex
trackBlobArgsForCall []struct {
arg1 string
arg2 io.ReadCloser
}
trackBlobReturns struct {
result1 releasedir.Blob
result2 error
}
UntrackBlobStub func(string) error
untrackBlobMutex sync.RWMutex
untrackBlobArgsForCall []struct {
arg1 string
}
untrackBlobReturns struct {
result1 error
}
}
func (fake *FakeBlobsDir) Init() error {
fake.initMutex.Lock()
fake.initArgsForCall = append(fake.initArgsForCall, struct{}{})
fake.initMutex.Unlock()
if fake.InitStub != nil {
return fake.InitStub()
} else {
return fake.initReturns.result1
}
}
func (fake *FakeBlobsDir) InitCallCount() int {
fake.initMutex.RLock()
defer fake.initMutex.RUnlock()
return len(fake.initArgsForCall)
}
func (fake *FakeBlobsDir) InitReturns(result1 error) {
fake.InitStub = nil
fake.initReturns = struct {
result1 error
}{result1}
}
func (fake *FakeBlobsDir) Blobs() ([]releasedir.Blob, error) {
fake.blobsMutex.Lock()
fake.blobsArgsForCall = append(fake.blobsArgsForCall, struct{}{})
fake.blobsMutex.Unlock()
if fake.BlobsStub != nil {
return fake.BlobsStub()
} else {
return fake.blobsReturns.result1, fake.blobsReturns.result2
}
}
func (fake *FakeBlobsDir) BlobsCallCount() int {
fake.blobsMutex.RLock()
defer fake.blobsMutex.RUnlock()
return len(fake.blobsArgsForCall)
}
func (fake *FakeBlobsDir) BlobsReturns(result1 []releasedir.Blob, result2 error) {
fake.BlobsStub = nil
fake.blobsReturns = struct {
result1 []releasedir.Blob
result2 error
}{result1, result2}
}
func (fake *FakeBlobsDir) DownloadBlobs() error {
fake.downloadBlobsMutex.Lock()
fake.downloadBlobsArgsForCall = append(fake.downloadBlobsArgsForCall, struct{}{})
fake.downloadBlobsMutex.Unlock()
if fake.DownloadBlobsStub != nil {
return fake.DownloadBlobsStub()
} else {
return fake.downloadBlobsReturns.result1
}
}
func (fake *FakeBlobsDir) DownloadBlobsCallCount() int {
fake.downloadBlobsMutex.RLock()
defer fake.downloadBlobsMutex.RUnlock()
return len(fake.downloadBlobsArgsForCall)
}
func (fake *FakeBlobsDir) DownloadBlobsReturns(result1 error) {
fake.DownloadBlobsStub = nil
fake.downloadBlobsReturns = struct {
result1 error
}{result1}
}
func (fake *FakeBlobsDir) UploadBlobs() error {
fake.uploadBlobsMutex.Lock()
fake.uploadBlobsArgsForCall = append(fake.uploadBlobsArgsForCall, struct{}{})
fake.uploadBlobsMutex.Unlock()
if fake.UploadBlobsStub != nil {
return fake.UploadBlobsStub()
} else {
return fake.uploadBlobsReturns.result1
}
}
func (fake *FakeBlobsDir) UploadBlobsCallCount() int {
fake.uploadBlobsMutex.RLock()
defer fake.uploadBlobsMutex.RUnlock()
return len(fake.uploadBlobsArgsForCall)
}
func (fake *FakeBlobsDir) UploadBlobsReturns(result1 error) {
fake.UploadBlobsStub = nil
fake.uploadBlobsReturns = struct {
result1 error
}{result1}
}
func (fake *FakeBlobsDir) TrackBlob(arg1 string, arg2 io.ReadCloser) (releasedir.Blob, error) {
fake.trackBlobMutex.Lock()
fake.trackBlobArgsForCall = append(fake.trackBlobArgsForCall, struct {
arg1 string
arg2 io.ReadCloser
}{arg1, arg2})
fake.trackBlobMutex.Unlock()
if fake.TrackBlobStub != nil {
return fake.TrackBlobStub(arg1, arg2)
} else {
return fake.trackBlobReturns.result1, fake.trackBlobReturns.result2
}
}
func (fake *FakeBlobsDir) TrackBlobCallCount() int {
fake.trackBlobMutex.RLock()
defer fake.trackBlobMutex.RUnlock()
return len(fake.trackBlobArgsForCall)
}
func (fake *FakeBlobsDir) TrackBlobArgsForCall(i int) (string, io.ReadCloser) {
fake.trackBlobMutex.RLock()
defer fake.trackBlobMutex.RUnlock()
return fake.trackBlobArgsForCall[i].arg1, fake.trackBlobArgsForCall[i].arg2
}
func (fake *FakeBlobsDir) TrackBlobReturns(result1 releasedir.Blob, result2 error) {
fake.TrackBlobStub = nil
fake.trackBlobReturns = struct {
result1 releasedir.Blob
result2 error
}{result1, result2}
}
func (fake *FakeBlobsDir) UntrackBlob(arg1 string) error {
fake.untrackBlobMutex.Lock()
fake.untrackBlobArgsForCall = append(fake.untrackBlobArgsForCall, struct {
arg1 string
}{arg1})
fake.untrackBlobMutex.Unlock()
if fake.UntrackBlobStub != nil {
return fake.UntrackBlobStub(arg1)
} else {
return fake.untrackBlobReturns.result1
}
}
func (fake *FakeBlobsDir) UntrackBlobCallCount() int {
fake.untrackBlobMutex.RLock()
defer fake.untrackBlobMutex.RUnlock()
return len(fake.untrackBlobArgsForCall)
}
func (fake *FakeBlobsDir) UntrackBlobArgsForCall(i int) string {
fake.untrackBlobMutex.RLock()
defer fake.untrackBlobMutex.RUnlock()
return fake.untrackBlobArgsForCall[i].arg1
}
func (fake *FakeBlobsDir) UntrackBlobReturns(result1 error) {
fake.UntrackBlobStub = nil
fake.untrackBlobReturns = struct {
result1 error
}{result1}
}
var _ releasedir.BlobsDir = new(FakeBlobsDir)