Files
tendermint/rpc/client/main_test.go
Callum Waters c5c2aafad2 abci: implement finalize block (#9468)
Adds the `FinalizeBlock` method which replaces `BeginBlock`, `DeliverTx`, and `EndBlock` in a single call.
2022-11-28 23:12:28 +01:00

31 lines
625 B
Go

package client_test
import (
"os"
"testing"
"github.com/tendermint/tendermint/abci/example/kvstore"
nm "github.com/tendermint/tendermint/node"
rpctest "github.com/tendermint/tendermint/rpc/test"
)
var node *nm.Node
func TestMain(m *testing.M) {
// start a tendermint node (and kvstore) in the background to test against
dir, err := os.MkdirTemp("/tmp", "rpc-client-test")
if err != nil {
panic(err)
}
app := kvstore.NewPersistentApplication(dir)
node = rpctest.StartTendermint(app)
code := m.Run()
// and shut down proper at the end
rpctest.StopTendermint(node)
_ = os.RemoveAll(dir)
os.Exit(code)
}