A bit of cleanup in localcachelayer test descriptions (#13283)

This commit is contained in:
Sanele T. Mahlalela
2019-12-18 15:10:00 +02:00
committed by Ben Schumacher
parent e43b404579
commit 0ffe199928
7 changed files with 15 additions and 15 deletions

View File

@@ -34,7 +34,7 @@ func TestChannelStoreChannelMemberCountsCache(t *testing.T) {
mockStore.Channel().(*mocks.ChannelStore).AssertNumberOfCalls(t, "GetMemberCount", 1)
})
t.Run("first call not cached, second force no cached", func(t *testing.T) {
t.Run("first call not cached, second force not cached", func(t *testing.T) {
mockStore := getMockStore()
cachedStore := NewLocalCacheLayer(mockStore, nil, nil)
@@ -44,7 +44,7 @@ func TestChannelStoreChannelMemberCountsCache(t *testing.T) {
mockStore.Channel().(*mocks.ChannelStore).AssertNumberOfCalls(t, "GetMemberCount", 2)
})
t.Run("first call force no cached, second not cached, third cached", func(t *testing.T) {
t.Run("first call force not cached, second not cached, third cached", func(t *testing.T) {
mockStore := getMockStore()
cachedStore := NewLocalCacheLayer(mockStore, nil, nil)
@@ -108,7 +108,7 @@ func TestChannelStoreChannelPinnedPostsCountsCache(t *testing.T) {
mockStore.Channel().(*mocks.ChannelStore).AssertNumberOfCalls(t, "GetPinnedPostCount", 1)
})
t.Run("first call not cached, second force no cached", func(t *testing.T) {
t.Run("first call not cached, second force not cached", func(t *testing.T) {
mockStore := getMockStore()
cachedStore := NewLocalCacheLayer(mockStore, nil, nil)
@@ -118,7 +118,7 @@ func TestChannelStoreChannelPinnedPostsCountsCache(t *testing.T) {
mockStore.Channel().(*mocks.ChannelStore).AssertNumberOfCalls(t, "GetPinnedPostCount", 2)
})
t.Run("first call force no cached, second not cached, third cached", func(t *testing.T) {
t.Run("first call force not cached, second not cached, third cached", func(t *testing.T) {
mockStore := getMockStore()
cachedStore := NewLocalCacheLayer(mockStore, nil, nil)
@@ -170,7 +170,7 @@ func TestChannelStoreGuestCountCache(t *testing.T) {
mockStore.Channel().(*mocks.ChannelStore).AssertNumberOfCalls(t, "GetGuestCount", 1)
})
t.Run("first call not cached, second force no cached", func(t *testing.T) {
t.Run("first call not cached, second force not cached", func(t *testing.T) {
mockStore := getMockStore()
cachedStore := NewLocalCacheLayer(mockStore, nil, nil)
@@ -180,7 +180,7 @@ func TestChannelStoreGuestCountCache(t *testing.T) {
mockStore.Channel().(*mocks.ChannelStore).AssertNumberOfCalls(t, "GetGuestCount", 2)
})
t.Run("first call force no cached, second not cached, third cached", func(t *testing.T) {
t.Run("first call force not cached, second not cached, third cached", func(t *testing.T) {
mockStore := getMockStore()
cachedStore := NewLocalCacheLayer(mockStore, nil, nil)

View File

@@ -48,7 +48,7 @@ func TestEmojiStoreCache(t *testing.T) {
mockStore.Emoji().(*mocks.EmojiStore).AssertNumberOfCalls(t, "GetByName", 1)
})
t.Run("first call by id not cached, second force no cached", func(t *testing.T) {
t.Run("first call by id not cached, second force not cached", func(t *testing.T) {
mockStore := getMockStore()
cachedStore := NewLocalCacheLayer(mockStore, nil, nil)
@@ -58,7 +58,7 @@ func TestEmojiStoreCache(t *testing.T) {
mockStore.Emoji().(*mocks.EmojiStore).AssertNumberOfCalls(t, "Get", 2)
})
t.Run("first call by name not cached, second force no cached", func(t *testing.T) {
t.Run("first call by name not cached, second force not cached", func(t *testing.T) {
mockStore := getMockStore()
cachedStore := NewLocalCacheLayer(mockStore, nil, nil)
@@ -68,7 +68,7 @@ func TestEmojiStoreCache(t *testing.T) {
mockStore.Emoji().(*mocks.EmojiStore).AssertNumberOfCalls(t, "GetByName", 2)
})
t.Run("first call by id force no cached, second not cached, third cached", func(t *testing.T) {
t.Run("first call by id force not cached, second not cached, third cached", func(t *testing.T) {
mockStore := getMockStore()
cachedStore := NewLocalCacheLayer(mockStore, nil, nil)
@@ -80,7 +80,7 @@ func TestEmojiStoreCache(t *testing.T) {
mockStore.Emoji().(*mocks.EmojiStore).AssertNumberOfCalls(t, "Get", 2)
})
t.Run("first call by name force no cached, second not cached, third cached", func(t *testing.T) {
t.Run("first call by name force not cached, second not cached, third cached", func(t *testing.T) {
mockStore := getMockStore()
cachedStore := NewLocalCacheLayer(mockStore, nil, nil)

View File

@@ -141,7 +141,7 @@ func TestPostStoreCache(t *testing.T) {
mockStore.Post().(*mocks.PostStore).AssertNumberOfCalls(t, "GetPosts", 1)
})
t.Run("first call not cached, second force no cached", func(t *testing.T) {
t.Run("first call not cached, second force not cached", func(t *testing.T) {
mockStore := getMockStore()
cachedStore := NewLocalCacheLayer(mockStore, nil, nil)

View File

@@ -34,7 +34,7 @@ func TestReactionStoreCache(t *testing.T) {
mockStore.Reaction().(*mocks.ReactionStore).AssertNumberOfCalls(t, "GetForPost", 1)
})
t.Run("first call not cached, second force no cached", func(t *testing.T) {
t.Run("first call not cached, second force not cached", func(t *testing.T) {
mockStore := getMockStore()
cachedStore := NewLocalCacheLayer(mockStore, nil, nil)

View File

@@ -35,7 +35,7 @@ func TestTeamStoreCache(t *testing.T) {
mockStore.Team().(*mocks.TeamStore).AssertNumberOfCalls(t, "GetUserTeamIds", 1)
})
t.Run("first call not cached, second force no cached", func(t *testing.T) {
t.Run("first call not cached, second force not cached", func(t *testing.T) {
mockStore := getMockStore()
cachedStore := NewLocalCacheLayer(mockStore, nil, nil)

View File

@@ -36,7 +36,7 @@ func TestUserStoreCache(t *testing.T) {
mockStore.User().(*mocks.UserStore).AssertNumberOfCalls(t, "GetProfileByIds", 1)
})
t.Run("first call not cached, second force no cached", func(t *testing.T) {
t.Run("first call not cached, second force not cached", func(t *testing.T) {
mockStore := getMockStore()
cachedStore := NewLocalCacheLayer(mockStore, nil, nil)

View File

@@ -35,7 +35,7 @@ func TestWebhookStoreCache(t *testing.T) {
mockStore.Webhook().(*mocks.WebhookStore).AssertNumberOfCalls(t, "GetIncoming", 1)
})
t.Run("first call not cached, second force no cached", func(t *testing.T) {
t.Run("first call not cached, second force not cached", func(t *testing.T) {
mockStore := getMockStore()
cachedStore := NewLocalCacheLayer(mockStore, nil, nil)