Remove the logrus logger wrapper
This commit is contained in:
@@ -58,11 +58,11 @@ func newAPI(s storage.Storage, logger log.Logger, t *testing.T) *apiClient {
|
||||
|
||||
// Attempts to create, update and delete a test Password
|
||||
func TestPassword(t *testing.T) {
|
||||
logger := log.NewLogrusLogger(&logrus.Logger{
|
||||
logger := &logrus.Logger{
|
||||
Out: os.Stderr,
|
||||
Formatter: &logrus.TextFormatter{DisableColors: true},
|
||||
Level: logrus.DebugLevel,
|
||||
})
|
||||
}
|
||||
|
||||
s := memory.New(logger)
|
||||
client := newAPI(s, logger, t)
|
||||
@@ -123,11 +123,11 @@ func TestPassword(t *testing.T) {
|
||||
|
||||
// Ensures checkCost returns expected values
|
||||
func TestCheckCost(t *testing.T) {
|
||||
logger := log.NewLogrusLogger(&logrus.Logger{
|
||||
logger := &logrus.Logger{
|
||||
Out: os.Stderr,
|
||||
Formatter: &logrus.TextFormatter{DisableColors: true},
|
||||
Level: logrus.DebugLevel,
|
||||
})
|
||||
}
|
||||
|
||||
s := memory.New(logger)
|
||||
client := newAPI(s, logger, t)
|
||||
@@ -180,11 +180,11 @@ func TestCheckCost(t *testing.T) {
|
||||
|
||||
// Attempts to list and revoke an exisiting refresh token.
|
||||
func TestRefreshToken(t *testing.T) {
|
||||
logger := log.NewLogrusLogger(&logrus.Logger{
|
||||
logger := &logrus.Logger{
|
||||
Out: os.Stderr,
|
||||
Formatter: &logrus.TextFormatter{DisableColors: true},
|
||||
Level: logrus.DebugLevel,
|
||||
})
|
||||
}
|
||||
|
||||
s := memory.New(logger)
|
||||
client := newAPI(s, logger, t)
|
||||
@@ -293,11 +293,11 @@ func TestRefreshToken(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestUpdateClient(t *testing.T) {
|
||||
logger := log.NewLogrusLogger(&logrus.Logger{
|
||||
logger := &logrus.Logger{
|
||||
Out: os.Stderr,
|
||||
Formatter: &logrus.TextFormatter{DisableColors: true},
|
||||
Level: logrus.DebugLevel,
|
||||
})
|
||||
}
|
||||
|
||||
s := memory.New(logger)
|
||||
client := newAPI(s, logger, t)
|
||||
|
@@ -8,7 +8,6 @@ import (
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/dexidp/dex/pkg/log"
|
||||
"github.com/dexidp/dex/storage"
|
||||
"github.com/dexidp/dex/storage/memory"
|
||||
)
|
||||
@@ -68,11 +67,11 @@ func TestKeyRotater(t *testing.T) {
|
||||
// Only the last 5 verification keys are expected to be kept around.
|
||||
maxVerificationKeys := 5
|
||||
|
||||
l := log.NewLogrusLogger(&logrus.Logger{
|
||||
l := &logrus.Logger{
|
||||
Out: os.Stderr,
|
||||
Formatter: &logrus.TextFormatter{DisableColors: true},
|
||||
Level: logrus.DebugLevel,
|
||||
})
|
||||
}
|
||||
|
||||
r := &keyRotater{
|
||||
Storage: memory.New(l),
|
||||
|
@@ -30,7 +30,6 @@ import (
|
||||
|
||||
"github.com/dexidp/dex/connector"
|
||||
"github.com/dexidp/dex/connector/mock"
|
||||
"github.com/dexidp/dex/pkg/log"
|
||||
"github.com/dexidp/dex/storage"
|
||||
"github.com/dexidp/dex/storage/memory"
|
||||
)
|
||||
@@ -75,11 +74,11 @@ FDWV28nTP9sqbtsmU8Tem2jzMvZ7C/Q0AuDoKELFUpux8shm8wfIhyaPnXUGZoAZ
|
||||
Np4vUwMSYV5mopESLWOg3loBxKyLGFtgGKVCjGiQvy6zISQ4fQo=
|
||||
-----END RSA PRIVATE KEY-----`)
|
||||
|
||||
var logger = log.NewLogrusLogger(&logrus.Logger{
|
||||
var logger = &logrus.Logger{
|
||||
Out: os.Stderr,
|
||||
Formatter: &logrus.TextFormatter{DisableColors: true},
|
||||
Level: logrus.DebugLevel,
|
||||
})
|
||||
}
|
||||
|
||||
func newTestServer(ctx context.Context, t *testing.T, updateConfig func(c *Config)) (*httptest.Server, *Server) {
|
||||
var server *Server
|
||||
|
Reference in New Issue
Block a user