chore: update testutil network docs (#11948)

This commit is contained in:
colin axnér 2022-05-12 13:13:12 +02:00 committed by GitHub
parent 5e41804568
commit 61bd185105
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,20 +24,22 @@ A typical testing flow might look like the following:
type IntegrationTestSuite struct {
suite.Suite
cfg testutil.Config
network *testutil.Network
cfg network.Config
network *network.Network
}
func (s *IntegrationTestSuite) SetupSuite() {
s.T().Log("setting up integration test suite")
cfg := testutil.DefaultConfig()
cfg := network.DefaultConfig()
cfg.NumValidators = 1
s.cfg = cfg
s.network = testutil.New(s.T(), cfg)
_, err := s.network.WaitForHeight(1)
var err error
s.network, err = network.New(s.T(), s.T().TempDir(), cfg)
s.Require().NoError(err)
_, err = s.network.WaitForHeight(1)
s.Require().NoError(err)
}