Combine local and http into client package, unify tests with table-driven tests

This commit is contained in:
Ethan Frey
2017-02-23 14:16:59 +01:00
parent 202146e4ce
commit 931af6a072
9 changed files with 314 additions and 538 deletions

24
rpc/client/main_test.go Normal file
View File

@ -0,0 +1,24 @@
package client_test
import (
"os"
"testing"
meapp "github.com/tendermint/merkleeyes/app"
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 merkleeyes) in the background to test against
app := meapp.NewMerkleEyesApp("", 100)
node = rpctest.StartTendermint(app)
code := m.Run()
// and shut down proper at the end
node.Stop()
node.Wait()
os.Exit(code)
}