You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
918 B

  1. /*
  2. package tests contain integration tests and helper functions for testing
  3. the RPC interface
  4. In particular, it allows us to spin up a tendermint node in process, with
  5. a live RPC server, which we can use to verify our rpc calls. It provides
  6. all data structures, enabling us to do more complex tests (like node_test.go)
  7. that introspect the blocks themselves to validate signatures and the like.
  8. It currently only spins up one node, it would be interesting to expand it
  9. to multiple nodes to see the real effects of validating partially signed
  10. blocks.
  11. */
  12. package rpctest
  13. import (
  14. "os"
  15. "testing"
  16. "github.com/tendermint/abci/example/dummy"
  17. )
  18. func TestMain(m *testing.M) {
  19. // start a tendermint node (and merkleeyes) in the background to test against
  20. app := dummy.NewDummyApplication()
  21. node := StartTendermint(app)
  22. code := m.Run()
  23. // and shut down proper at the end
  24. node.Stop()
  25. node.Wait()
  26. os.Exit(code)
  27. }