[MM-13833] Configured unit tests to log through t.Log (#10272)
* Rerouted the unit test logs through t.Log * resolving merge confilvts * Update testing.go * Update helper_test.go * Added godocs for NewTestingLogger * Added go docs for NewTestingLogger * Resolving conflicts
Этот коммит содержится в:
коммит произвёл
Jesse Hallam
родитель
a6d0b73c0d
Коммит
39ceaa3e86
@@ -15,7 +15,7 @@ import (
|
||||
)
|
||||
|
||||
func TestCreateTeam(t *testing.T) {
|
||||
th := Setup().InitBasic()
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
id := model.NewId()
|
||||
@@ -37,7 +37,7 @@ func TestCreateTeam(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestCreateTeamWithUser(t *testing.T) {
|
||||
th := Setup().InitBasic()
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
id := model.NewId()
|
||||
@@ -58,7 +58,7 @@ func TestCreateTeamWithUser(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestUpdateTeam(t *testing.T) {
|
||||
th := Setup().InitBasic()
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
th.BasicTeam.DisplayName = "Testing 123"
|
||||
@@ -74,7 +74,7 @@ func TestUpdateTeam(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAddUserToTeam(t *testing.T) {
|
||||
th := Setup().InitBasic()
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
t.Run("add user", func(t *testing.T) {
|
||||
@@ -188,7 +188,7 @@ func TestAddUserToTeam(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAddUserToTeamByToken(t *testing.T) {
|
||||
th := Setup().InitBasic()
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
user := model.User{Email: strings.ToLower(model.NewId()) + "success+test@example.com", Nickname: "Darth Vader", Username: "vader" + model.NewId(), Password: "passwd1", AuthService: ""}
|
||||
@@ -289,7 +289,7 @@ func TestAddUserToTeamByToken(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAddUserToTeamByTeamId(t *testing.T) {
|
||||
th := Setup().InitBasic()
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
t.Run("add user", func(t *testing.T) {
|
||||
@@ -322,7 +322,7 @@ func TestAddUserToTeamByTeamId(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPermanentDeleteTeam(t *testing.T) {
|
||||
th := Setup().InitBasic()
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
team, err := th.App.CreateTeam(&model.Team{
|
||||
@@ -383,7 +383,7 @@ func TestPermanentDeleteTeam(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSanitizeTeam(t *testing.T) {
|
||||
th := Setup()
|
||||
th := Setup(t)
|
||||
defer th.TearDown()
|
||||
|
||||
team := &model.Team{
|
||||
@@ -513,7 +513,7 @@ func TestSanitizeTeam(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSanitizeTeams(t *testing.T) {
|
||||
th := Setup()
|
||||
th := Setup(t)
|
||||
defer th.TearDown()
|
||||
|
||||
t.Run("not a system admin", func(t *testing.T) {
|
||||
@@ -597,7 +597,7 @@ func TestSanitizeTeams(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestJoinUserToTeam(t *testing.T) {
|
||||
th := Setup().InitBasic()
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
id := model.NewId()
|
||||
@@ -685,7 +685,7 @@ func TestJoinUserToTeam(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAppUpdateTeamScheme(t *testing.T) {
|
||||
th := Setup().InitBasic()
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
team := th.BasicTeam
|
||||
@@ -703,7 +703,7 @@ func TestAppUpdateTeamScheme(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetTeamMembers(t *testing.T) {
|
||||
th := Setup().InitBasic()
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
var userIDs sort.StringSlice
|
||||
@@ -745,7 +745,7 @@ func TestGetTeamMembers(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetTeamStats(t *testing.T) {
|
||||
th := Setup().InitBasic()
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
teamStats, err := th.App.GetTeamStats(th.BasicTeam.Id)
|
||||
|
||||
Ссылка в новой задаче
Block a user