Skip to content

Commit

Permalink
update tests to use the new logger API
Browse files Browse the repository at this point in the history
  • Loading branch information
belimawr committed Jan 26, 2024
1 parent 74ac78b commit f4b3c15
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ func newErrorLogger(t *testing.T) *logger.Logger {
loggerCfg := logger.DefaultLoggingConfig()
loggerCfg.Level = logp.ErrorLevel

log, err := logger.NewFromConfig("", loggerCfg, false)
log, err := logger.NewFromConfig("", loggerCfg, nil, false)
require.NoError(t, err)
return log
}
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/agent/application/upgrade/cleanup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func newErrorLogger(t *testing.T) *logger.Logger {
loggerCfg := logger.DefaultLoggingConfig()
loggerCfg.Level = logp.ErrorLevel

log, err := logger.NewFromConfig("", loggerCfg, false)
log, err := logger.NewFromConfig("", loggerCfg, nil, false)
require.NoError(t, err)
return log
}
2 changes: 1 addition & 1 deletion internal/pkg/agent/protection/policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
func getLogger() *logger.Logger {
loggerCfg := logger.DefaultLoggingConfig()
loggerCfg.Level = logp.DebugLevel
l, _ := logger.NewFromConfig("", loggerCfg, false)
l, _ := logger.NewFromConfig("", loggerCfg, nil, false)
return l
}

Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/basecmd/version/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func newErrorLogger(t *testing.T) *logger.Logger {
loggerCfg := logger.DefaultLoggingConfig()
loggerCfg.Level = logp.ErrorLevel

log, err := logger.NewFromConfig("", loggerCfg, false)
log, err := logger.NewFromConfig("", loggerCfg, nil, false)
require.NoError(t, err)
return log
}
2 changes: 1 addition & 1 deletion internal/pkg/composable/providers/kubernetes/pod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
func getLogger() *logger.Logger {
loggerCfg := logger.DefaultLoggingConfig()
loggerCfg.Level = logp.ErrorLevel
l, _ := logger.NewFromConfig("", loggerCfg, false)
l, _ := logger.NewFromConfig("", loggerCfg, nil, false)
return l
}

Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/fleetapi/acker/lazy/lazy_acker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func TestLazyAcker(t *testing.T) {
cfg.Level = logp.DebugLevel
// cfg.ToFiles = false
cfg.ToStderr = true
log, _ := logger.NewFromConfig("", cfg, true)
log, _ := logger.NewFromConfig("", cfg, nil, true)

// Tests
tests := []struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/testutils/testutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func NewErrorLogger(t *testing.T) *logger.Logger {
loggerCfg := logger.DefaultLoggingConfig()
loggerCfg.Level = logp.ErrorLevel

log, err := logger.NewFromConfig("", loggerCfg, false)
log, err := logger.NewFromConfig("", loggerCfg, nil, false)
require.NoError(t, err)
return log
}
2 changes: 1 addition & 1 deletion pkg/control/v2/control_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func newErrorLogger(t *testing.T) *logger.Logger {
loggerCfg := logger.DefaultLoggingConfig()
loggerCfg.Level = logp.ErrorLevel

log, err := logger.NewFromConfig("", loggerCfg, false)
log, err := logger.NewFromConfig("", loggerCfg, nil, false)
require.NoError(t, err)
return log
}

0 comments on commit f4b3c15

Please sign in to comment.