diff options
author | Sami Hiltunen <shiltunen@gitlab.com> | 2023-08-22 14:46:13 +0300 |
---|---|---|
committer | Sami Hiltunen <shiltunen@gitlab.com> | 2023-08-31 09:29:18 +0300 |
commit | 97b4c2fdfb7fe78be017fd3819a1849039a02377 (patch) | |
tree | a8c1b8f1835227cb45f7d8c56148fe2dae97d165 /internal/bootstrap | |
parent | a3dedd2661cada20c703b79d93c6fbbb62d48f90 (diff) |
Replace NewLogger calls with SharedLogger calls in tests
This commit wires the tests to call SharedLogger instead of NewLogger
so they'll use the test case's shared logger. This way the log output
is printed to the same logger and is ordered.
Diffstat (limited to 'internal/bootstrap')
-rw-r--r-- | internal/bootstrap/bootstrap_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/bootstrap/bootstrap_test.go b/internal/bootstrap/bootstrap_test.go index c9cd7e131..fa9f3155b 100644 --- a/internal/bootstrap/bootstrap_test.go +++ b/internal/bootstrap/bootstrap_test.go @@ -74,7 +74,7 @@ func TestBootstrap_unixListener(t *testing.T) { hasParent: tc.hasParent, } - b, err := _new(testhelper.NewLogger(t), upgrader, listen, false, &prometheus.CounterVec{}) + b, err := _new(testhelper.SharedLogger(t), upgrader, listen, false, &prometheus.CounterVec{}) require.NoError(t, err) if tc.preexistingSocket { @@ -219,7 +219,7 @@ func TestBootstrap_gracefulTermination(t *testing.T) { } func TestBootstrap_portReuse(t *testing.T) { - b, err := New(testhelper.NewLogger(t), &prometheus.CounterVec{}) + b, err := New(testhelper.SharedLogger(t), &prometheus.CounterVec{}) require.NoError(t, err) l, err := b.listen("tcp", "localhost:") @@ -267,7 +267,7 @@ func setup(t *testing.T, ctx context.Context) (*Bootstrap, *mockUpgrader, mockLi readyCh: make(chan error), } - b, err := _new(testhelper.NewLogger(t), u, net.Listen, false, &prometheus.CounterVec{}) + b, err := _new(testhelper.SharedLogger(t), u, net.Listen, false, &prometheus.CounterVec{}) require.NoError(t, err) listeners := mockListeners{} |