Integrate Tendermint v0.35.0, including changes to build and test plumbing necessary to make everything build. This change does not update any SDK APIs to make use of new features. Co-authored-by: marbar3778 <marbar3778@yahoo.com> Co-authored-by: tycho garen <garen@tychoish.com> Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com> Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> Co-authored-by: Callum Waters <cmwaters19@gmail.com>
44 lines
949 B
Go
44 lines
949 B
Go
// +build norace
|
|
|
|
package network_test
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
|
|
"github.com/stretchr/testify/suite"
|
|
|
|
"github.com/cosmos/cosmos-sdk/testutil/network"
|
|
)
|
|
|
|
type IntegrationTestSuite struct {
|
|
suite.Suite
|
|
|
|
network *network.Network
|
|
}
|
|
|
|
func (s *IntegrationTestSuite) SetupSuite() {
|
|
s.T().Log("setting up integration test suite")
|
|
|
|
var err error
|
|
s.network, err = network.New(s.T(), s.T().TempDir(), network.DefaultConfig())
|
|
s.Require().NoError(err)
|
|
|
|
h, err := s.network.WaitForHeight(1)
|
|
s.Require().NoError(err, "stalled at height %d", h)
|
|
}
|
|
|
|
func (s *IntegrationTestSuite) TearDownSuite() {
|
|
s.T().Log("tearing down integration test suite")
|
|
s.network.Cleanup()
|
|
}
|
|
|
|
func (s *IntegrationTestSuite) TestNetwork_Liveness() {
|
|
h, err := s.network.WaitForHeightWithTimeout(10, time.Minute)
|
|
s.Require().NoError(err, "expected to reach 10 blocks; got %d", h)
|
|
}
|
|
|
|
func TestIntegrationTestSuite(t *testing.T) {
|
|
suite.Run(t, new(IntegrationTestSuite))
|
|
}
|