diff options
author | Patrick Bajao <ebajao@gitlab.com> | 2021-08-04 08:43:43 +0000 |
---|---|---|
committer | Patrick Bajao <ebajao@gitlab.com> | 2021-08-04 08:43:43 +0000 |
commit | 7b44ce1d4a0716d27acabb4f826eb5613dade082 (patch) | |
tree | 51a9edeb92dbb8743ae1927f62d8d86cde0e861a /internal/logger/logger_test.go | |
parent | df0138b5f0f8f998a832c6c063128f56d1953604 (diff) | |
parent | 1274858f5565d59dcc36813964334a21fffc369b (diff) | |
download | gitlab-shell-7b44ce1d4a0716d27acabb4f826eb5613dade082.tar.gz |
Merge branch '499-use-labkit-logging-initialize' into 'main'
Switch to labkit for logging system setup
Closes #271
See merge request gitlab-org/gitlab-shell!504
Diffstat (limited to 'internal/logger/logger_test.go')
-rw-r--r-- | internal/logger/logger_test.go | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/internal/logger/logger_test.go b/internal/logger/logger_test.go index 6360ad9..43bd2ab 100644 --- a/internal/logger/logger_test.go +++ b/internal/logger/logger_test.go @@ -7,8 +7,9 @@ import ( "strings" "testing" - log "github.com/sirupsen/logrus" "github.com/stretchr/testify/require" + "gitlab.com/gitlab-org/labkit/log" + "gitlab.com/gitlab-org/gitlab-shell/internal/config" ) @@ -22,7 +23,9 @@ func TestConfigure(t *testing.T) { LogFormat: "json", } - Configure(&config) + closer := Configure(&config) + defer closer.Close() + log.Info("this is a test") tmpFile.Close() @@ -42,7 +45,9 @@ func TestConfigureWithPermissionError(t *testing.T) { LogFormat: "json", } - Configure(&config) + closer := Configure(&config) + defer closer.Close() + log.Info("this is a test") } @@ -57,7 +62,9 @@ func TestLogInUTC(t *testing.T) { LogFormat: "json", } - Configure(&config) + closer := Configure(&config) + defer closer.Close() + log.Info("this is a test") data, err := ioutil.ReadFile(tmpFile.Name()) |