Add tear down to APIv4 tests (#5250)
* Add tear down to APIv4 tests * Defer tear downs
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
60be5c902f
Коммит
365514174e
@@ -340,6 +340,14 @@ func TestChannelStoreDelete(t *testing.T) {
|
||||
if len(*list) != 1 {
|
||||
t.Fatal("invalid number of channels")
|
||||
}
|
||||
|
||||
<-store.Channel().PermanentDelete(o2.Id)
|
||||
|
||||
cresult = <-store.Channel().GetChannels(o1.TeamId, m1.UserId)
|
||||
t.Log(cresult.Err)
|
||||
if cresult.Err.Id != "store.sql_channel.get_channels.not_found.app_error" {
|
||||
t.Fatal("no channels should be found")
|
||||
}
|
||||
}
|
||||
|
||||
func TestChannelStoreGetByName(t *testing.T) {
|
||||
@@ -560,6 +568,15 @@ func TestChannelDeleteMemberStore(t *testing.T) {
|
||||
if count != 1 {
|
||||
t.Fatal("should have removed 1 member")
|
||||
}
|
||||
|
||||
if r1 := <-store.Channel().PermanentDeleteMembersByChannel(o1.ChannelId); r1.Err != nil {
|
||||
t.Fatal(r1.Err)
|
||||
}
|
||||
|
||||
count = (<-store.Channel().GetMemberCount(o1.ChannelId, false)).Data.(int64)
|
||||
if count != 0 {
|
||||
t.Fatal("should have removed all members")
|
||||
}
|
||||
}
|
||||
|
||||
func TestChannelStoreGetChannels(t *testing.T) {
|
||||
|
||||
Ссылка в новой задаче
Block a user