Small test logger imporvements #638

Merged
fyrchik merged 3 commits from fyrchik/frostfs-node:fix-test-logger into master 2023-08-23 11:21:08 +00:00

3 commits

Author SHA1 Message Date
e2f80e29d6 [#638] Unify test loggers
All checks were successful
DCO action / DCO (pull_request) Successful in 2m52s
Build / Build Components (1.21) (pull_request) Successful in 4m44s
Build / Build Components (1.20) (pull_request) Successful in 5m49s
Vulncheck / Vulncheck (pull_request) Successful in 6m49s
Tests and linters / Lint (pull_request) Successful in 8m5s
Tests and linters / Staticcheck (pull_request) Successful in 8m23s
Tests and linters / Tests (1.21) (pull_request) Successful in 8m41s
Tests and linters / Tests (1.20) (pull_request) Successful in 8m51s
Tests and linters / Tests with -race (pull_request) Successful in 9m14s
In some places we have debug=false, in others debug=true.
Let's be consistent.

Semantic patch:
```
@@
@@
-test.NewLogger(..., false)
+test.NewLogger(..., true)
```

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-08-23 10:57:08 +03:00
825657d7dc [#638] Use test.NewLogger() in tests
Semantic patch (restricted to **/*_test.go):
```
@@
@@
+import "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/util/logger/test"
-import "go.uber.org/zap"
-import "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/util/logger"

-&logger.Logger{Logger: zap.L()}
+test.NewLogger(t, false)
```

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-08-23 10:57:08 +03:00
4dc85f0cb4 [#638] logger: Remove sampling from test loggers
Losing logs is always a bad idea, especially when we debug tests.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-08-23 10:57:08 +03:00