mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-24 14:22:16 +00:00
* implement broadcast_duplicate_vote endpoint * fix test_cover * address comments * address comments * Update abci/example/kvstore/persistent_kvstore.go Co-Authored-By: mossid <torecursedivine@gmail.com> * Update rpc/client/main_test.go Co-Authored-By: mossid <torecursedivine@gmail.com> * address comments in progress * reformat the code * make linter happy * make tests pass * replace BroadcastDuplicateVote with BroadcastEvidence * fix test * fix endpoint name * improve doc * fix TestBroadcastEvidenceDuplicateVote * Update rpc/core/evidence.go Co-Authored-By: Thane Thomson <connect@thanethomson.com> * add changelog entry * fix TestBroadcastEvidenceDuplicateVote
30 lines
623 B
Go
30 lines
623 B
Go
package client_test
|
|
|
|
import (
|
|
"io/ioutil"
|
|
"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 := ioutil.TempDir("/tmp", "rpc-client-test")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
app := kvstore.NewPersistentKVStoreApplication(dir)
|
|
node = rpctest.StartTendermint(app)
|
|
|
|
code := m.Run()
|
|
|
|
// and shut down proper at the end
|
|
rpctest.StopTendermint(node)
|
|
os.Exit(code)
|
|
}
|