pkg/services: Check errors (#19712)
* pkg/services: Check errors * pkg/services: Don't treat context.Canceled|context.DeadlineExceeded as error
This commit is contained in:
@@ -124,7 +124,8 @@ func TestUserAuthToken(t *testing.T) {
|
||||
for i := 0; i < 3; i++ {
|
||||
userId := userID + int64(i+1)
|
||||
userIds = append(userIds, userId)
|
||||
userAuthTokenService.CreateToken(context.Background(), userId, "192.168.10.11:1234", "some user agent")
|
||||
_, err := userAuthTokenService.CreateToken(context.Background(), userId, "192.168.10.11:1234", "some user agent")
|
||||
So(err, ShouldBeNil)
|
||||
}
|
||||
|
||||
err := userAuthTokenService.BatchRevokeAllUserTokens(context.Background(), userIds)
|
||||
@@ -441,7 +442,8 @@ func TestUserAuthToken(t *testing.T) {
|
||||
utMap := utJSON.MustMap()
|
||||
|
||||
var uat userAuthToken
|
||||
uat.fromUserToken(&ut)
|
||||
err = uat.fromUserToken(&ut)
|
||||
So(err, ShouldBeNil)
|
||||
uatBytes, err := json.Marshal(uat)
|
||||
So(err, ShouldBeNil)
|
||||
uatJSON, err := simplejson.NewJson(uatBytes)
|
||||
|
||||
Reference in New Issue
Block a user