Skip to content

Commit

Permalink
[MM-59825] Fix linter error found by updated govet (mattermost#27715)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanzei authored Jul 23, 2024
1 parent 45acf31 commit 733156e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions server/channels/app/channel_bookmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -486,13 +486,13 @@ func TestUpdateChannelBookmarkSortOrder(t *testing.T) {

t.Run("change order of bookmarks error when new index is out of bounds", func(t *testing.T) {
_, appErr = th.App.UpdateChannelBookmarkSortOrder(bookmark3.Id, channelId, int64(-1), "")
assert.Error(t, appErr)
assert.NotNil(t, appErr)
_, appErr = th.App.UpdateChannelBookmarkSortOrder(bookmark3.Id, channelId, int64(5), "")
assert.Error(t, appErr)
assert.NotNil(t, appErr)
})

t.Run("change order of bookmarks error when bookmark not found", func(t *testing.T) {
_, appErr = th.App.UpdateChannelBookmarkSortOrder(model.NewId(), channelId, int64(0), "")
assert.Error(t, appErr)
assert.NotNil(t, appErr)
})
}
2 changes: 1 addition & 1 deletion server/channels/app/integration_action_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func TestPostActionEmptyResponse(t *testing.T) {
})

_, err = th.App.DoPostActionWithCookie(th.Context, post.Id, attachments[0].Actions[0].Id, th.BasicUser.Id, "", nil)
require.Error(t, err)
require.NotNil(t, err)
assert.Contains(t, err.DetailedError, "context deadline exceeded")
})
}
Expand Down
10 changes: 5 additions & 5 deletions server/channels/app/user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@ func TestPasswordChangeSessionTermination(t *testing.T) {
require.False(t, session.IsExpired())

session2, err = th.App.GetSession(session2.Token)
require.Error(t, err)
require.NotNil(t, err)
require.Nil(t, session2)

// Cleanup
Expand Down Expand Up @@ -1311,11 +1311,11 @@ func TestPasswordChangeSessionTermination(t *testing.T) {
require.Nil(t, err)

session, err = th.App.GetSession(session.Token)
require.Error(t, err)
require.NotNil(t, err)
require.Nil(t, session)

session2, err = th.App.GetSession(session2.Token)
require.Error(t, err)
require.NotNil(t, err)
require.Nil(t, session2)

// Cleanup
Expand Down Expand Up @@ -2136,7 +2136,7 @@ func TestGetUsersForReporting(t *testing.T) {
EndAt: 500,
},
})
require.Error(t, err)
require.NotNil(t, err)
require.Nil(t, userReports)
})

Expand All @@ -2150,7 +2150,7 @@ func TestGetUsersForReporting(t *testing.T) {
PageSize: 50,
},
})
require.Error(t, err)
require.NotNil(t, err)
require.Nil(t, userReports)
})

Expand Down

0 comments on commit 733156e

Please sign in to comment.