[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
Этот коммит содержится в:
Shreyansh Chouhan
2019-02-14 23:22:11 +05:30
коммит произвёл Jesse Hallam
родитель a6d0b73c0d
Коммит 39ceaa3e86
56 изменённых файлов: 316 добавлений и 264 удалений

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

@@ -20,7 +20,7 @@ import (
)
func TestCreateIncomingWebhookForChannel(t *testing.T) {
th := Setup().InitBasic()
th := Setup(t).InitBasic()
defer th.TearDown()
type TestCase struct {
@@ -151,7 +151,7 @@ func TestCreateIncomingWebhookForChannel(t *testing.T) {
}
func TestUpdateIncomingWebhook(t *testing.T) {
th := Setup().InitBasic()
th := Setup(t).InitBasic()
defer th.TearDown()
type TestCase struct {
@@ -289,7 +289,7 @@ func TestUpdateIncomingWebhook(t *testing.T) {
}
func TestCreateWebhookPost(t *testing.T) {
th := Setup().InitBasic()
th := Setup(t).InitBasic()
defer th.TearDown()
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.EnableIncomingWebhooks = true })
@@ -478,7 +478,7 @@ func TestSplitWebhookPost(t *testing.T) {
}
func TestCreateOutGoingWebhookWithUsernameAndIconURL(t *testing.T) {
th := Setup().InitBasic()
th := Setup(t).InitBasic()
defer th.TearDown()
outgoingWebhook := model.OutgoingWebhook{
@@ -597,7 +597,7 @@ func TestTriggerOutGoingWebhookWithUsernameAndIconURL(t *testing.T) {
return testCasesOutgoing
}
th := Setup().InitBasic()
th := Setup(t).InitBasic()
defer th.TearDown()
th.App.UpdateConfig(func(cfg *model.Config) {
@@ -668,7 +668,7 @@ func (r InfiniteReader) Read(p []byte) (n int, err error) {
}
func TestDoOutgoingWebhookRequest(t *testing.T) {
th := Setup().InitBasic()
th := Setup(t).InitBasic()
defer th.TearDown()
th.App.UpdateConfig(func(cfg *model.Config) {