Switch to Postgres when running tests and turn off the fsync setting (#13678)
* Run all tests fasts in postgres * Moving postgres config to a file * Addressing PR review comments * Testing against mysql in the CI to keep things less changed * Revert "Testing against mysql in the CI to keep things less changed" This reverts commit fc940c111db269a821c54e005d76df87cb70e031. * Fixing a test broken in postgres but working in mysql * Fixing some tests * Fixing some config tests with postgres * Fixing the rest of config tests * Fixing govet error * Fixing search tests for postgres
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
55b646ecf8
Коммит
596f986755
@@ -2609,9 +2609,16 @@ func TestAutocompleteChannels(t *testing.T) {
|
||||
Type: model.CHANNEL_PRIVATE,
|
||||
TeamId: th.BasicTeam.Id,
|
||||
})
|
||||
tower, _ := th.Client.CreateChannel(&model.Channel{
|
||||
DisplayName: "Tower",
|
||||
Name: "tower",
|
||||
Type: model.CHANNEL_OPEN,
|
||||
TeamId: th.BasicTeam.Id,
|
||||
})
|
||||
utils.EnableDebugLogForTest()
|
||||
defer func() {
|
||||
th.Client.DeleteChannel(ptown.Id)
|
||||
th.Client.DeleteChannel(tower.Id)
|
||||
}()
|
||||
|
||||
for _, tc := range []struct {
|
||||
@@ -2626,21 +2633,21 @@ func TestAutocompleteChannels(t *testing.T) {
|
||||
th.BasicTeam.Id,
|
||||
"town",
|
||||
[]string{"town-square"},
|
||||
[]string{"off-topic", "town"},
|
||||
[]string{"off-topic", "town", "tower"},
|
||||
},
|
||||
{
|
||||
"Basic off-topic",
|
||||
th.BasicTeam.Id,
|
||||
"off-to",
|
||||
[]string{"off-topic"},
|
||||
[]string{"town-square", "town"},
|
||||
[]string{"town-square", "town", "tower"},
|
||||
},
|
||||
{
|
||||
"Basic town square and off topic",
|
||||
th.BasicTeam.Id,
|
||||
"to",
|
||||
[]string{"off-topic", "town-square"},
|
||||
[]string{"town"},
|
||||
"tow",
|
||||
[]string{"town-square", "tower"},
|
||||
[]string{"off-topic", "town"},
|
||||
},
|
||||
} {
|
||||
t.Run(tc.description, func(t *testing.T) {
|
||||
@@ -2740,11 +2747,11 @@ func TestAutocompleteChannelsForSearch(t *testing.T) {
|
||||
[]string{"town-square", "town", "townpriv"},
|
||||
},
|
||||
{
|
||||
"Basic town square and off topic",
|
||||
"Basic town square and townpriv",
|
||||
th.BasicTeam.Id,
|
||||
"to",
|
||||
[]string{"off-topic", "town-square", "townpriv"},
|
||||
[]string{"town"},
|
||||
"tow",
|
||||
[]string{"town-square", "townpriv"},
|
||||
[]string{"off-topic", "town"},
|
||||
},
|
||||
{
|
||||
"Direct and group messages",
|
||||
|
||||
Ссылка в новой задаче
Block a user