Add whitespace linter (#24855)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
176370e175
Коммит
0d5a8b8841
@@ -680,7 +680,6 @@ func testGetChannelsWithTeamDataByIds(t *testing.T, ss store.Store) {
|
||||
}
|
||||
|
||||
func testChannelStoreGetForPost(t *testing.T, ss store.Store) {
|
||||
|
||||
ch := &model.Channel{
|
||||
TeamId: model.NewId(),
|
||||
DisplayName: "Name",
|
||||
@@ -1032,7 +1031,6 @@ func testChannelStoreGetDeleted(t *testing.T, ss store.Store) {
|
||||
list, nErr = ss.Channel().GetDeleted(o1.TeamId, 1, 1, userId)
|
||||
require.NoError(t, nErr, nErr)
|
||||
require.Len(t, list, 1, "wrong list length")
|
||||
|
||||
}
|
||||
|
||||
func testChannelMemberStore(t *testing.T, ss store.Store) {
|
||||
|
||||
@@ -241,7 +241,6 @@ func testEmojiGetList(t *testing.T, ss store.Store) {
|
||||
assert.Equal(t, 2, len(remojis))
|
||||
assert.Equal(t, emojis[1].Name, remojis[0].Name)
|
||||
assert.Equal(t, emojis[2].Name, remojis[1].Name)
|
||||
|
||||
}
|
||||
|
||||
func testEmojiSearch(t *testing.T, ss store.Store) {
|
||||
|
||||
@@ -221,7 +221,6 @@ func testFileInfoGetForPost(t *testing.T, ss store.Store) {
|
||||
)
|
||||
require.NoError(t, err)
|
||||
assert.Len(t, postInfos, tc.ExpectedPosts)
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1293,7 +1293,6 @@ func testPluginList(t *testing.T, ss store.Store) {
|
||||
if i%10 == 0 {
|
||||
// Expire keys 0, 10, 20, ...
|
||||
expireAt = 1
|
||||
|
||||
} else if (i+5)%10 == 0 {
|
||||
// Mark for future expiry keys 5, 15, 25, ...
|
||||
expireAt = now + 5*60*1000
|
||||
|
||||
@@ -20,7 +20,6 @@ func TestPostPriorityStore(t *testing.T, ss store.Store, s SqlStore) {
|
||||
}
|
||||
|
||||
func testPostPriorityStoreGetForPost(t *testing.T, ss store.Store) {
|
||||
|
||||
t.Run("Save post priority when in post's metadata", func(t *testing.T) {
|
||||
p1 := model.Post{}
|
||||
p1.ChannelId = model.NewId()
|
||||
|
||||
@@ -4402,7 +4402,6 @@ func testPostStoreGetRepliesForExport(t *testing.T, ss store.Store) {
|
||||
assert.Equal(t, reply1.Id, p2.Id)
|
||||
assert.Equal(t, reply1.Message, p2.Message)
|
||||
assert.Equal(t, reply1.Username, u1.Username)
|
||||
|
||||
}
|
||||
|
||||
func testPostStoreGetDirectPostParentsForExportAfter(t *testing.T, ss store.Store, s SqlStore) {
|
||||
@@ -5095,5 +5094,4 @@ func testGetEditHistoryForPost(t *testing.T, ss store.Store) {
|
||||
_, err = ss.Post().GetEditHistoryForPost(savedUpdatedPost.Id)
|
||||
require.NoError(t, err)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
@@ -191,7 +191,6 @@ func testPreferenceGetAll(t *testing.T, ss store.Store) {
|
||||
for i := 0; i < 3; i++ {
|
||||
assert.Falsef(t, result[0] != preferences[i] && result[1] != preferences[i] && result[2] != preferences[i], "got incorrect preferences")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func testPreferenceDeleteByUser(t *testing.T, ss store.Store) {
|
||||
|
||||
@@ -76,5 +76,4 @@ func testClearOld(t *testing.T, ss store.Store) {
|
||||
res, err := ss.ProductNotices().GetViews("testuser")
|
||||
require.NoError(t, err)
|
||||
require.Len(t, res, 1)
|
||||
|
||||
}
|
||||
|
||||
@@ -382,7 +382,6 @@ func testReactionGetForPostSince(t *testing.T, ss store.Store, s SqlStore) {
|
||||
for _, r := range returned {
|
||||
assert.Zero(t, r.DeleteAt, "should not have returned deleted reaction")
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
t.Run("reactions since, incl deleted", func(t *testing.T) {
|
||||
@@ -397,7 +396,6 @@ func testReactionGetForPostSince(t *testing.T, ss store.Store, s SqlStore) {
|
||||
}
|
||||
}
|
||||
assert.Equal(t, 1, count, "should not have returned 1 deleted reaction")
|
||||
|
||||
})
|
||||
|
||||
t.Run("reactions since, filter remoteId", func(t *testing.T) {
|
||||
@@ -561,7 +559,6 @@ func testReactionDeleteAllWithEmojiName(t *testing.T, ss store.Store, s SqlStore
|
||||
postList, err = ss.Post().Get(context.Background(), post3.Id, model.GetPostsOptions{}, "", map[string]bool{})
|
||||
require.NoError(t, err)
|
||||
assert.False(t, postList.Posts[post3.Id].HasReactions, "post shouldn't have reactions any more")
|
||||
|
||||
}
|
||||
|
||||
func testPermanentDeleteByUser(t *testing.T, ss store.Store) {
|
||||
@@ -805,7 +802,6 @@ func testReactionBulkGetForPosts(t *testing.T, ss store.Store) {
|
||||
}
|
||||
|
||||
require.False(t, post4IdFound, "Wrong reaction returned")
|
||||
|
||||
}
|
||||
|
||||
// testReactionDeadlock is a best-case attempt to recreate the deadlock scenario.
|
||||
|
||||
@@ -26,7 +26,6 @@ func TestRemoteClusterStore(t *testing.T, ss store.Store) {
|
||||
}
|
||||
|
||||
func testRemoteClusterSave(t *testing.T, ss store.Store) {
|
||||
|
||||
t.Run("Save", func(t *testing.T) {
|
||||
rc := &model.RemoteCluster{
|
||||
Name: "some_remote",
|
||||
|
||||
@@ -3198,7 +3198,6 @@ func testGetChannelUnreadsForTeam(t *testing.T, ss store.Store) {
|
||||
}
|
||||
|
||||
func testUpdateLastTeamIconUpdate(t *testing.T, ss store.Store) {
|
||||
|
||||
// team icon initially updated a second ago
|
||||
lastTeamIconUpdateInitial := model.GetMillis() - 1000
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ func TestThreadStore(t *testing.T, ss store.Store, s SqlStore) {
|
||||
|
||||
func testThreadStorePopulation(t *testing.T, ss store.Store) {
|
||||
makeSomePosts := func(urgent bool) []*model.Post {
|
||||
|
||||
u1 := model.User{
|
||||
Email: MakeEmail(),
|
||||
Username: model.NewId(),
|
||||
|
||||
@@ -21,7 +21,6 @@ func TestTrueUpReviewStatusStore(t *testing.T, ss store.Store, s SqlStore) {
|
||||
}
|
||||
|
||||
func testCreateTrueUpReviewStatus(t *testing.T, ss store.Store) {
|
||||
|
||||
now := time.Date(time.Now().Year(), time.January, 1, 0, 0, 0, 0, time.Local)
|
||||
|
||||
reviewStatus := model.TrueUpReviewStatus{
|
||||
@@ -39,7 +38,6 @@ func testCreateTrueUpReviewStatus(t *testing.T, ss store.Store) {
|
||||
}
|
||||
|
||||
func testGetTrueUpReviewStatus(t *testing.T, ss store.Store) {
|
||||
|
||||
now := time.Date(time.Now().Year(), time.August, 1, 0, 0, 0, 0, time.Local)
|
||||
dueDate := utils.GetNextTrueUpReviewDueDate(now).UnixMilli()
|
||||
|
||||
@@ -61,7 +59,6 @@ func testGetTrueUpReviewStatus(t *testing.T, ss store.Store) {
|
||||
}
|
||||
|
||||
func testUpdateTrueUpReviewStatus(t *testing.T, ss store.Store) {
|
||||
|
||||
now := time.Date(time.Now().Year(), time.April, 1, 0, 0, 0, 0, time.Local)
|
||||
|
||||
reviewStatus := model.TrueUpReviewStatus{
|
||||
|
||||
@@ -1035,7 +1035,6 @@ func testUserStoreGetProfilesInChannel(t *testing.T, ss store.Store) {
|
||||
}
|
||||
|
||||
func testUserStoreGetProfilesInChannelByAdmin(t *testing.T, ss store.Store, s SqlStore) {
|
||||
|
||||
cleanupStatusStore(t, s)
|
||||
|
||||
teamId := model.NewId()
|
||||
@@ -1114,7 +1113,6 @@ func testUserStoreGetProfilesInChannelByAdmin(t *testing.T, ss store.Store, s Sq
|
||||
}
|
||||
|
||||
func testUserStoreGetProfilesInChannelByStatus(t *testing.T, ss store.Store, s SqlStore) {
|
||||
|
||||
cleanupStatusStore(t, s)
|
||||
|
||||
teamId := model.NewId()
|
||||
@@ -2553,7 +2551,6 @@ func testUserStoreUpdateMfaActive(t *testing.T, ss store.Store) {
|
||||
}
|
||||
|
||||
func testUserStoreGetRecentlyActiveUsersForTeam(t *testing.T, ss store.Store, s SqlStore) {
|
||||
|
||||
cleanupStatusStore(t, s)
|
||||
|
||||
teamId := model.NewId()
|
||||
@@ -4268,7 +4265,6 @@ func testCount(t *testing.T, ss store.Store) {
|
||||
}
|
||||
|
||||
func testUserStoreAnalyticsActiveCount(t *testing.T, ss store.Store, s SqlStore) {
|
||||
|
||||
cleanupStatusStore(t, s)
|
||||
|
||||
// Create 5 users statuses u0, u1, u2, u3, u4.
|
||||
@@ -4353,7 +4349,6 @@ func testUserStoreAnalyticsActiveCount(t *testing.T, ss store.Store, s SqlStore)
|
||||
}
|
||||
|
||||
func testUserStoreAnalyticsActiveCountForPeriod(t *testing.T, ss store.Store, s SqlStore) {
|
||||
|
||||
cleanupStatusStore(t, s)
|
||||
|
||||
// Create 5 users statuses u0, u1, u2, u3, u4.
|
||||
@@ -4482,7 +4477,6 @@ func testUserStoreAnalyticsGetSystemAdminCount(t *testing.T, ss store.Store) {
|
||||
result, err := ss.User().AnalyticsGetSystemAdminCount()
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, countBefore+1, result, "Did not get the expected number of system admins.")
|
||||
|
||||
}
|
||||
|
||||
func testUserStoreAnalyticsGetGuestCount(t *testing.T, ss store.Store) {
|
||||
|
||||
@@ -53,7 +53,6 @@ func testWebhookStoreSaveIncoming(t *testing.T, ss store.Store) {
|
||||
}
|
||||
|
||||
func testWebhookStoreUpdateIncoming(t *testing.T, ss store.Store) {
|
||||
|
||||
var err error
|
||||
|
||||
o1 := buildIncomingWebhook()
|
||||
|
||||
Ссылка в новой задаче
Block a user