mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-22 07:06:14 +00:00
use more specific require statements
This commit is contained in:
@@ -869,7 +869,8 @@ func makeGenesisState(t *testing.T, cfg *config.Config, args genesisStateArgs) (
|
||||
args.Time = time.Now()
|
||||
}
|
||||
genDoc := factory.GenesisDoc(cfg, args.Time, valSet.Validators, args.Params)
|
||||
s0, _ := sm.MakeGenesisState(genDoc)
|
||||
s0, err := sm.MakeGenesisState(genDoc)
|
||||
require.NoError(t, err)
|
||||
return s0, privValidators
|
||||
}
|
||||
|
||||
|
||||
@@ -441,7 +441,7 @@ func TestTimelyProposal(t *testing.T) {
|
||||
|
||||
pbtsTest := newPBTSTestHarness(ctx, t, cfg)
|
||||
results := pbtsTest.run()
|
||||
assert.True(t, results.height2.prevote.BlockID.Hash != nil)
|
||||
require.NotNil(t, results.height2.prevote.BlockID.Hash)
|
||||
}
|
||||
|
||||
func TestTooFarInThePastProposal(t *testing.T) {
|
||||
@@ -464,9 +464,8 @@ func TestTooFarInThePastProposal(t *testing.T) {
|
||||
|
||||
pbtsTest := newPBTSTestHarness(ctx, t, cfg)
|
||||
results := pbtsTest.run()
|
||||
time.Sleep(1 * time.Second)
|
||||
|
||||
assert.True(t, results.height2.prevote.BlockID.Hash == nil)
|
||||
require.Nil(t, results.height2.prevote.BlockID.Hash)
|
||||
}
|
||||
|
||||
func TestTooFarInTheFutureProposal(t *testing.T) {
|
||||
@@ -491,5 +490,5 @@ func TestTooFarInTheFutureProposal(t *testing.T) {
|
||||
pbtsTest := newPBTSTestHarness(ctx, t, cfg)
|
||||
results := pbtsTest.run()
|
||||
|
||||
assert.True(t, results.height2.prevote.BlockID.Hash == nil)
|
||||
require.Nil(t, results.height2.prevote.BlockID.Hash)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user