Skip to content

Commit 75fc68c

Browse files
authored
correcting error message to be same as our code (#1851)
1 parent ae34d88 commit 75fc68c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

restapi/user_watch_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,27 +167,27 @@ func TestWatch(t *testing.T) {
167167
}
168168
wo.Events() <- info
169169
}
170-
wo.Errors() <- &probe.Error{Cause: fmt.Errorf("error on Watch")}
170+
wo.Errors() <- &probe.Error{Cause: fmt.Errorf("error on watch")}
171171
}(wo)
172172
return wo, nil
173173
}
174174
connWriteMessageMock = func(messageType int, data []byte) error {
175175
return nil
176176
}
177177
if err := startWatch(ctx, mockWSConn, client, testOptions); assert.Error(err) {
178-
assert.Equal("error on Watch", err.Error())
178+
assert.Equal("error on watch", err.Error())
179179
}
180180

181181
// Test-4: error happens on Watch, watch should stop
182182
// and error shall be returned.
183183
mcWatchMock = func(ctx context.Context, params mc.WatchOptions) (*mc.WatchObject, *probe.Error) {
184-
return nil, &probe.Error{Cause: fmt.Errorf("error on Watch")}
184+
return nil, &probe.Error{Cause: fmt.Errorf("error on watch")}
185185
}
186186
if err := startWatch(ctx, mockWSConn, client, testOptions); assert.Error(err) {
187-
assert.Equal("error on Watch", err.Error())
187+
assert.Equal("error on watch", err.Error())
188188
}
189189

190-
// Test-5: return nil on error on Watch
190+
// Test-5: return nil on error on watch
191191
mcWatchMock = func(ctx context.Context, params mc.WatchOptions) (*mc.WatchObject, *probe.Error) {
192192
wo := &mc.WatchObject{
193193
EventInfoChan: make(chan []mc.EventInfo),

0 commit comments

Comments
 (0)