* Add go.mod for simapp * creating dep check script * new version of cosmos-sdk * tests/ must be a module also if it is to test simapp * maybe add a github action which should fail * mv tests/mocks -> testutil/mock * Refactor usages of tests/mocks * update build command * fix rosetta tests * go mod tidy * use cosmossdk.io/simapp * Update sim entrypoints * use simapp as a module * go mod tidy * Add replaced for vuln package * fix vuln dep * this CI run should fail * this CI run should succeed * use absolute path in makefile
43 lines
981 B
Go
43 lines
981 B
Go
package simapp_test
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
|
|
"github.com/stretchr/testify/suite"
|
|
|
|
"cosmossdk.io/simapp"
|
|
"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(simapp.NewTestNetworkFixture))
|
|
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))
|
|
}
|