[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 удалений

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

@@ -13,7 +13,7 @@ import (
)
func TestHandleNewNotifications(t *testing.T) {
th := Setup()
th := Setup(t)
defer th.TearDown()
id1 := model.NewId()
@@ -94,7 +94,7 @@ func TestHandleNewNotifications(t *testing.T) {
}
func TestCheckPendingNotifications(t *testing.T) {
th := Setup().InitBasic()
th := Setup(t).InitBasic()
defer th.TearDown()
job := NewEmailBatchingJob(th.Server, 128)
@@ -202,7 +202,7 @@ func TestCheckPendingNotifications(t *testing.T) {
* Ensures that email batch interval defaults to 15 minutes for users that haven't explicitly set this preference
*/
func TestCheckPendingNotificationsDefaultInterval(t *testing.T) {
th := Setup().InitBasic()
th := Setup(t).InitBasic()
defer th.TearDown()
job := NewEmailBatchingJob(th.Server, 128)
@@ -240,7 +240,7 @@ func TestCheckPendingNotificationsDefaultInterval(t *testing.T) {
* Ensures that email batch interval defaults to 15 minutes if user preference is invalid
*/
func TestCheckPendingNotificationsCantParseInterval(t *testing.T) {
th := Setup().InitBasic()
th := Setup(t).InitBasic()
defer th.TearDown()
job := NewEmailBatchingJob(th.Server, 128)
@@ -286,7 +286,7 @@ func TestCheckPendingNotificationsCantParseInterval(t *testing.T) {
* Ensures that post contents are not included in notification email when email notification content type is set to generic
*/
func TestRenderBatchedPostGeneric(t *testing.T) {
th := Setup()
th := Setup(t)
defer th.TearDown()
var post = &model.Post{}
@@ -313,7 +313,7 @@ func TestRenderBatchedPostGeneric(t *testing.T) {
* Ensures that post contents included in notification email when email notification content type is set to full
*/
func TestRenderBatchedPostFull(t *testing.T) {
th := Setup()
th := Setup(t)
defer th.TearDown()
var post = &model.Post{}