Remove unused variables / code (#7736)

* remove unused variables / code

* fix bug in testPostStoreGetOldest
Этот коммит содержится в:
Chris
2017-10-30 11:58:00 -05:00
коммит произвёл GitHub
родитель c5e8cb25ca
Коммит 3cbacb6858
11 изменённых файлов: 6 добавлений и 371 удалений

Просмотреть файл

@@ -18,14 +18,3 @@ func hintsContains(hints []LayeredStoreHint, contains LayeredStoreHint) bool {
}
return false
}
func hintsContainsAny(hints []LayeredStoreHint, contains ...LayeredStoreHint) bool {
for _, hint := range hints {
for _, hint2 := range contains {
if hint == hint2 {
return true
}
}
}
return false
}

Просмотреть файл

@@ -420,11 +420,6 @@ func (s SqlChannelStore) PermanentDeleteMembersByChannel(channelId string) store
})
}
type channelWithMember struct {
model.Channel
model.ChannelMember
}
func (s SqlChannelStore) GetChannels(teamId string, userId string) store.StoreChannel {
return store.Do(func(result *store.StoreResult) {
data := &model.ChannelList{}

Просмотреть файл

@@ -41,6 +41,7 @@ func TestPostStore(t *testing.T, ss store.Store) {
t.Run("GetPostsByIds", func(t *testing.T) { testPostStoreGetPostsByIds(t, ss) })
t.Run("GetPostsBatchForIndexing", func(t *testing.T) { testPostStoreGetPostsBatchForIndexing(t, ss) })
t.Run("PermanentDeleteBatch", func(t *testing.T) { testPostStorePermanentDeleteBatch(t, ss) })
t.Run("GetOldest", func(t *testing.T) { testPostStoreGetOldest(t, ss) })
}
func testPostStoreSave(t *testing.T, ss store.Store) {
@@ -1700,7 +1701,6 @@ func testPostStoreGetOldest(t *testing.T, ss store.Store) {
o1 = (<-ss.Post().Save(o1)).Data.(*model.Post)
o2 := &model.Post{}
o2.Id = model.NewId()
o2.ChannelId = o1.ChannelId
o2.UserId = model.NewId()
o2.Message = "zz" + model.NewId() + "b"