[#596] Use zaptest.Logger
All checks were successful
/ DCO (pull_request) Successful in 30s
/ Vulncheck (pull_request) Successful in 1m2s
/ Builds (pull_request) Successful in 1m19s
/ OCI image (pull_request) Successful in 2m4s
/ Lint (pull_request) Successful in 2m7s
/ Tests (pull_request) Successful in 1m17s
/ Vulncheck (push) Successful in 46s
/ Builds (push) Successful in 58s
/ OCI image (push) Successful in 1m59s
/ Lint (push) Successful in 2m12s
/ Tests (push) Successful in 1m39s
All checks were successful
/ DCO (pull_request) Successful in 30s
/ Vulncheck (pull_request) Successful in 1m2s
/ Builds (pull_request) Successful in 1m19s
/ OCI image (pull_request) Successful in 2m4s
/ Lint (pull_request) Successful in 2m7s
/ Tests (pull_request) Successful in 1m17s
/ Vulncheck (push) Successful in 46s
/ Builds (push) Successful in 58s
/ OCI image (push) Successful in 1m59s
/ Lint (push) Successful in 2m12s
/ Tests (push) Successful in 1m39s
Use zaptest to get logs which get printed only if a test fails or if you ran go test -v. Dont use zaptest.Logger for fuzz otherwise ngfuzz/libfuzz crashes Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
parent
f8852c7626
commit
0fba02aadb
6 changed files with 32 additions and 30 deletions
|
@ -18,7 +18,7 @@ import (
|
|||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/user"
|
||||
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
||||
"github.com/stretchr/testify/require"
|
||||
"go.uber.org/zap"
|
||||
"go.uber.org/zap/zaptest"
|
||||
)
|
||||
|
||||
func (tc *testContext) putObject(content []byte) *data.ObjectInfo {
|
||||
|
@ -139,7 +139,7 @@ type testContext struct {
|
|||
}
|
||||
|
||||
func prepareContext(t *testing.T, cachesConfig ...*CachesConfig) *testContext {
|
||||
logger := zap.NewExample()
|
||||
logger := zaptest.NewLogger(t)
|
||||
|
||||
key, err := keys.NewPrivateKey()
|
||||
require.NoError(t, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue