mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-02 06:07:08 +00:00
* Updated event sequencing and added query keyword * code cosmetics * Documentation update * Added per event indexing and querying to txindexer * rpc test fix * Added support for older versions where event sequencing is not supported * Added support for old versions to tx indexer * Added RPC match flag, fixed bugs in tx indexer, added tests * Removed reference to match.events from the docs * Openapi update * Added height deduplication Co-authored-by: Thane Thomson <connect@thanethomson.com> Co-authored-by: Anca Zamfir <zamfiranca@gmail.com> Co-authored-by: Sergio Mena <sergio@informal.systems> Co-authored-by: Romain Ruetschi <romain.ruetschi@gmail.com> Co-authored-by: Thane Thomson <connect@thanethomson.com>
33 lines
722 B
Go
33 lines
722 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.NewPersistentKVStoreApplication(dir)
|
|
// If testing block event generation
|
|
// app.SetGenBlockEvents() needs to be called here
|
|
node = rpctest.StartTendermint(app)
|
|
|
|
code := m.Run()
|
|
|
|
// and shut down proper at the end
|
|
rpctest.StopTendermint(node)
|
|
_ = os.RemoveAll(dir)
|
|
os.Exit(code)
|
|
}
|