Remove remaining t.Fatal from the codebase (#13876)

* Remove remaining t.Fatal from the codebase

* Fix job_store test

* Address review comments

* Remove comments
Этот коммит содержится в:
Miguel de la Cruz
2020-02-13 17:53:23 +01:00
коммит произвёл GitHub
родитель 17523fa5d9
Коммит 84f45634a8
18 изменённых файлов: 119 добавлений и 229 удалений

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

@@ -28,12 +28,6 @@ func TestChannelMemberIsValid(t *testing.T) {
o.NotifyProps = GetDefaultChannelNotifyProps()
o.UserId = NewId()
/*o.Roles = "missing"
o.NotifyProps = GetDefaultChannelNotifyProps()
o.UserId = NewId()
if err := o.IsValid(); err == nil {
t.Fatal("should be invalid")
}*/
o.NotifyProps["desktop"] = "junk"
require.Error(t, o.IsValid(), "should be invalid")

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

@@ -181,9 +181,7 @@ func TestConfigOverwriteAdminSettings(t *testing.T) {
c1.SetDefaults()
if *c1.SamlSettings.AdminAttribute != attribute {
t.Fatal("SamlSettings.AdminAttribute should be overwritten")
}
require.Equal(t, *c1.SamlSettings.AdminAttribute, attribute)
}
func TestConfigDefaultServiceSettingsExperimentalGroupUnreadChannels(t *testing.T) {

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

@@ -26,17 +26,6 @@ func TestTeamMemberIsValid(t *testing.T) {
o.TeamId = NewId()
require.Error(t, o.IsValid(), "should be invalid")
/*o.UserId = NewId()
o.Roles = "blahblah"
if err := o.IsValid(); err == nil {
t.Fatal("should be invalid")
}
o.Roles = ""
if err := o.IsValid(); err != nil {
t.Fatal(err)
}*/
}
func TestUnreadMemberJson(t *testing.T) {