Skip to content

Commit bb7ede0

Browse files
committed
fix: unit test fixed
1 parent 23df132 commit bb7ede0

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

dropbox_test.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,11 @@ func TestDropboxWatcher_Start(t *testing.T) {
9191
Entries: []files.IsMetadata{files.NewFileMetadata("name", "Id", modtime, modtime, "1", 120)},
9292
Cursor: "",
9393
HasMore: false,
94-
}, nil)
94+
},
95+
nil,
96+
)
9597

96-
dw.sync()
98+
dw.sync(false)
9799
event = <-dw.GetEvents()
98100

99101
if event.Key != "name" {
@@ -109,7 +111,7 @@ func TestDropboxWatcher_Start(t *testing.T) {
109111
Cursor: "",
110112
HasMore: false,
111113
}, nil)
112-
dw.sync()
114+
dw.sync(false)
113115

114116
// File modified : size changed
115117
m.EXPECT().ListFolder(arg).Return(
@@ -118,7 +120,7 @@ func TestDropboxWatcher_Start(t *testing.T) {
118120
Cursor: "",
119121
HasMore: false,
120122
}, nil)
121-
dw.sync()
123+
dw.sync(false)
122124
event = <-dw.GetEvents()
123125

124126
if event.Key != "name" {
@@ -134,7 +136,7 @@ func TestDropboxWatcher_Start(t *testing.T) {
134136
Cursor: "",
135137
HasMore: false,
136138
}, nil)
137-
dw.sync()
139+
dw.sync(false)
138140
event = <-dw.GetEvents()
139141

140142
if event.Key != "name" {
@@ -150,7 +152,7 @@ func TestDropboxWatcher_Start(t *testing.T) {
150152
Cursor: "",
151153
HasMore: false,
152154
}, nil)
153-
dw.sync()
155+
dw.sync(false)
154156
event = <-dw.GetEvents()
155157

156158
if event.Key != "name" {

s3_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func TestS3Watcher_Start(t *testing.T) {
118118
// we need to overwrite the client after the call to SetConfig
119119
sw.client = m
120120

121-
sw.sync()
121+
sw.sync(false)
122122

123123
// wrong bucket
124124
select {
@@ -166,7 +166,7 @@ func TestS3Watcher_Start(t *testing.T) {
166166
nil,
167167
)
168168

169-
sw.sync()
169+
sw.sync(false)
170170
select {
171171
case event = <-d.GetEvents():
172172
case <-time.After(1 * time.Second):
@@ -210,7 +210,7 @@ func TestS3Watcher_Start(t *testing.T) {
210210
nil,
211211
)
212212

213-
sw.sync()
213+
sw.sync(false)
214214
select {
215215
case event = <-d.GetEvents():
216216
case <-time.After(1 * time.Second):
@@ -252,7 +252,7 @@ func TestS3Watcher_Start(t *testing.T) {
252252
tag,
253253
nil,
254254
)
255-
sw.sync()
255+
sw.sync(false)
256256
select {
257257
case event = <-d.GetEvents():
258258
case <-time.After(1 * time.Second):
@@ -295,7 +295,7 @@ func TestS3Watcher_Start(t *testing.T) {
295295
tag,
296296
nil,
297297
)
298-
sw.sync()
298+
sw.sync(false)
299299
select {
300300
case event = <-d.GetEvents():
301301
case <-time.After(1 * time.Second):
@@ -323,7 +323,7 @@ func TestS3Watcher_Start(t *testing.T) {
323323
},
324324
)
325325

326-
sw.sync()
326+
sw.sync(false)
327327
select {
328328
case event = <-d.GetEvents():
329329
case <-time.After(1 * time.Second):

0 commit comments

Comments
 (0)