mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-03 14:47:16 +00:00
lint: errcheck (#5091)
## Description add more error checks to tests gonna do a third PR that tackles the non test cases
This commit is contained in:
+10
-2
@@ -17,7 +17,11 @@ func TestUnsafeDialSeeds(t *testing.T) {
|
||||
func(n int, sw *p2p.Switch) *p2p.Switch { return sw })
|
||||
err := sw.Start()
|
||||
require.NoError(t, err)
|
||||
defer sw.Stop()
|
||||
t.Cleanup(func() {
|
||||
if err := sw.Stop(); err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
})
|
||||
|
||||
env.Logger = log.TestingLogger()
|
||||
env.P2PPeers = sw
|
||||
@@ -47,7 +51,11 @@ func TestUnsafeDialPeers(t *testing.T) {
|
||||
func(n int, sw *p2p.Switch) *p2p.Switch { return sw })
|
||||
err := sw.Start()
|
||||
require.NoError(t, err)
|
||||
defer sw.Stop()
|
||||
t.Cleanup(func() {
|
||||
if err := sw.Stop(); err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
})
|
||||
|
||||
env.Logger = log.TestingLogger()
|
||||
env.P2PPeers = sw
|
||||
|
||||
Reference in New Issue
Block a user