[MM-27700] storetest/channel_store: fix flaky test for search too short term (#15242)
* storetest/channel_store: fix flaky test for search too short term * storetest/channel_store: use another stop word instead Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
1fadfa9f33
Коммит
9211a8b9d3
@@ -31,7 +31,8 @@ func cleanupChannels(t *testing.T, ss store.Store) {
|
|||||||
list, err := ss.Channel().GetAllChannels(0, 100000, store.ChannelSearchOpts{IncludeDeleted: true})
|
list, err := ss.Channel().GetAllChannels(0, 100000, store.ChannelSearchOpts{IncludeDeleted: true})
|
||||||
require.Nilf(t, err, "error cleaning all channels: %v", err)
|
require.Nilf(t, err, "error cleaning all channels: %v", err)
|
||||||
for _, channel := range *list {
|
for _, channel := range *list {
|
||||||
ss.Channel().PermanentDelete(channel.Id)
|
err = ss.Channel().PermanentDelete(channel.Id)
|
||||||
|
assert.NoError(t, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5373,8 +5374,8 @@ func testChannelStoreSearchAllChannels(t *testing.T, ss store.Store) {
|
|||||||
|
|
||||||
o10 := model.Channel{
|
o10 := model.Channel{
|
||||||
TeamId: t1.Id,
|
TeamId: t1.Id,
|
||||||
DisplayName: "B10 The",
|
DisplayName: "B10 That",
|
||||||
Name: "the",
|
Name: "that",
|
||||||
Type: model.CHANNEL_OPEN,
|
Type: model.CHANNEL_OPEN,
|
||||||
}
|
}
|
||||||
_, nErr = ss.Channel().Save(&o10, -1)
|
_, nErr = ss.Channel().Save(&o10, -1)
|
||||||
@@ -5440,7 +5441,7 @@ func testChannelStoreSearchAllChannels(t *testing.T, ss store.Store) {
|
|||||||
{"prefix", "off-", store.ChannelSearchOpts{IncludeDeleted: false}, &model.ChannelList{&o6, &o7, &o8}, 0},
|
{"prefix", "off-", store.ChannelSearchOpts{IncludeDeleted: false}, &model.ChannelList{&o6, &o7, &o8}, 0},
|
||||||
{"full match with dash", "off-topic", store.ChannelSearchOpts{IncludeDeleted: false}, &model.ChannelList{&o6}, 0},
|
{"full match with dash", "off-topic", store.ChannelSearchOpts{IncludeDeleted: false}, &model.ChannelList{&o6}, 0},
|
||||||
{"town square", "town square", store.ChannelSearchOpts{IncludeDeleted: false}, &model.ChannelList{&o9}, 0},
|
{"town square", "town square", store.ChannelSearchOpts{IncludeDeleted: false}, &model.ChannelList{&o9}, 0},
|
||||||
{"the in name", "the", store.ChannelSearchOpts{IncludeDeleted: false}, &model.ChannelList{&o10}, 0},
|
{"that in name", "that", store.ChannelSearchOpts{IncludeDeleted: false}, &model.ChannelList{&o10}, 0},
|
||||||
{"Mobile", "Mobile", store.ChannelSearchOpts{IncludeDeleted: false}, &model.ChannelList{&o11}, 0},
|
{"Mobile", "Mobile", store.ChannelSearchOpts{IncludeDeleted: false}, &model.ChannelList{&o11}, 0},
|
||||||
{"search purpose", "now searchable", store.ChannelSearchOpts{IncludeDeleted: false}, &model.ChannelList{&o12}, 0},
|
{"search purpose", "now searchable", store.ChannelSearchOpts{IncludeDeleted: false}, &model.ChannelList{&o12}, 0},
|
||||||
{"pipe ignored", "town square |", store.ChannelSearchOpts{IncludeDeleted: false}, &model.ChannelList{&o9}, 0},
|
{"pipe ignored", "town square |", store.ChannelSearchOpts{IncludeDeleted: false}, &model.ChannelList{&o9}, 0},
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user