diff --git a/rpc/tendermint/test/common_test.go b/rpc/tendermint/test/common_test.go index 0c5ba6096f727ed3c2796a22501f440c700d76fc..b2b0a48917df778a2f42178d9b85a8a08ebff4ae 100644 --- a/rpc/tendermint/test/common_test.go +++ b/rpc/tendermint/test/common_test.go @@ -2,36 +2,14 @@ package rpctest import ( "testing" - "github.com/eris-ltd/eris-db/test/fixtures" - "fmt" "os" ) // Needs to be in a _test.go file to be picked up func TestMain(m *testing.M) { - ffs := fixtures.NewFileFixtures("Eris-DB") - defer ffs.RemoveAll() - - err := initGlobalVariables(ffs) - - if err != nil { - panic(err) - } - - saveNewPriv() - - // start a node - - ready := make(chan error) - go newNode(ready) - err = <-ready - - if err != nil { - panic(err) - } - - returnValue := m.Run() - fmt.Println("foooooo", returnValue) + returnValue := TestWrapper(func() int { + return m.Run() + }) defer os.Exit(returnValue) } diff --git a/rpc/tendermint/test/genesis.go b/rpc/tendermint/test/genesis.go index 4ab7b0d46ecfb0de27b822a92e57ebdb8436528f..66b0c3ca1a4003ff1e6b30059cfee41911cb4bd9 100644 --- a/rpc/tendermint/test/genesis.go +++ b/rpc/tendermint/test/genesis.go @@ -2,7 +2,7 @@ package rpctest // priv keys generated deterministically eg rpc/tests/shared.go var defaultGenesis = `{ - "chain_id" : "tendermint_test", + "chain_id" : "MyChainId", "accounts": [ { "address": "E9B5D87313356465FAE33C406CE2C2979DE60BCB", diff --git a/rpc/tendermint/test/runner/main.go b/rpc/tendermint/test/runner/main.go new file mode 100644 index 0000000000000000000000000000000000000000..ca775c1a0cbd31169c087d0307d3240e9567c7ae --- /dev/null +++ b/rpc/tendermint/test/runner/main.go @@ -0,0 +1,13 @@ +package main + +import ( + "fmt" + + "github.com/eris-ltd/eris-db/util" + "github.com/eris-ltd/eris-db/rpc/tendermint/test" +) + +func main() { + fmt.Printf("%s", util.IsAddress("hello"), rpctest.Successor(2)) + //defer os.Exit(0) +} \ No newline at end of file diff --git a/rpc/tendermint/test/shared.go b/rpc/tendermint/test/shared.go index 39b473677e1b3e5affeadef2f5121cad3992d8a5..22603b6511ad6c93a7e071e7a97345139fe5d64c 100644 --- a/rpc/tendermint/test/shared.go +++ b/rpc/tendermint/test/shared.go @@ -107,8 +107,8 @@ func newNode(ready chan error) { // Sleep forever if err == nil { - ch := make(chan struct{}) - <-ch + //ch := make(chan struct{}) + //<-ch } }