mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-05 03:06:16 +00:00
tests: replace t.Fatal with require where possible
This makes tests less verbose and unifies the style they are written in.
This commit is contained in:
parent
66f96e3f32
commit
a3dacd3b74
14 changed files with 52 additions and 120 deletions
|
@ -29,9 +29,7 @@ func TestSendVersion(t *testing.T) {
|
|||
assert.Equal(t, uint32(0), version.StartHeight)
|
||||
}
|
||||
|
||||
if err := p.SendVersion(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
require.NoError(t, p.SendVersion())
|
||||
}
|
||||
|
||||
// Server should reply with a verack after receiving a valid version.
|
||||
|
@ -49,9 +47,7 @@ func TestVerackAfterHandleVersionCmd(t *testing.T) {
|
|||
}
|
||||
version := payload.NewVersion(1337, 3000, "/NEO-GO/", 0, true)
|
||||
|
||||
if err := s.handleVersionCmd(p, version); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
require.NoError(t, s.handleVersionCmd(p, version))
|
||||
}
|
||||
|
||||
// Server should not reply with a verack after receiving a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue