chore: audit server package (#14359)

This commit is contained in:
Aleksandr Bezobchuk
2022-12-19 19:42:09 +00:00
committed by GitHub
parent c918b1421d
commit bbd7e31305
6 changed files with 46 additions and 23 deletions
+9 -3
View File
@@ -3,15 +3,21 @@ package mock
import (
"fmt"
"os"
"testing"
abci "github.com/tendermint/tendermint/abci/types"
tmlog "github.com/tendermint/tendermint/libs/log"
)
// SetupApp returns an application as well as a clean-up function
// to be used to quickly setup a test case with an app.
// SetupApp returns an application as well as a clean-up function to be used to
// quickly setup a test case with an app.
func SetupApp() (abci.Application, func(), error) {
logger := tmlog.NewTMLogger(tmlog.NewSyncWriter(os.Stdout)).With("module", "mock")
var logger tmlog.Logger
if testing.Verbose() {
logger = tmlog.NewTMLogger(tmlog.NewSyncWriter(os.Stdout)).With("module", "mock")
} else {
logger = tmlog.NewNopLogger()
}
rootDir, err := os.MkdirTemp("", "mock-sdk")
if err != nil {