Remove remaining t.Fatal from the codebase (#13876)
* Remove remaining t.Fatal from the codebase * Fix job_store test * Address review comments * Remove comments
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
17523fa5d9
Коммит
84f45634a8
@@ -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) {
|
||||
|
||||
Ссылка в новой задаче
Block a user