forked from TrueCloudLab/frostfs-http-gw
[#219] Use zaptest.Logger
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
f9c5dc5260
commit
a651b5823f
3 changed files with 14 additions and 24 deletions
|
@ -60,12 +60,7 @@ func BenchmarkAll(b *testing.B) {
|
|||
func defaultMultipart(filename string) error {
|
||||
r, bound := multipartFile(filename)
|
||||
|
||||
logger, err := zap.NewProduction()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
file, err := fetchMultipartFileDefault(logger, r, bound)
|
||||
file, err := fetchMultipartFileDefault(zap.NewNop(), r, bound)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -87,12 +82,7 @@ func TestName(t *testing.T) {
|
|||
func customMultipart(filename string) error {
|
||||
r, bound := multipartFile(filename)
|
||||
|
||||
logger, err := zap.NewProduction()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
file, err := fetchMultipartFile(logger, r, bound)
|
||||
file, err := fetchMultipartFile(zap.NewNop(), r, bound)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue