refactoring tests util methods + adding context tests

This commit is contained in:
Julien Neuhart
2019-07-24 14:56:12 +02:00
parent 2be9ae7868
commit 554474776c
23 changed files with 295 additions and 234 deletions

23
test/xlog.go Normal file
View File

@@ -0,0 +1,23 @@
package test
import (
"github.com/thecodingmachine/gotenberg/internal/pkg/xlog"
)
// DebugLogger creates a xlog.Logger
// with xlog.DebugLevel for our tests.
func DebugLogger() xlog.Logger {
return xlog.New(xlog.DebugLevel, "tests")
}
// InfoLogger creates a xlog.Logger
// with xlog.InfoLevel for our tests.
func InfoLogger() xlog.Logger {
return xlog.New(xlog.DebugLevel, "tests")
}
// ErrorLogger creates a xlog.Logger
// with xlog.ErrorLevel for our tests.
func ErrorLogger() xlog.Logger {
return xlog.New(xlog.ErrorLevel, "tests")
}