From 23642a13bed48c700144e4b346d054b8e47879a8 Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Tue, 12 Jan 2021 17:27:27 -0800 Subject: [PATCH] device: check returned errors from NewPeer in TestNoiseHandshake Signed-off-by: Josh Bleecher Snyder --- device/noise_test.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/device/noise_test.go b/device/noise_test.go index ce89851..9ef780c 100644 --- a/device/noise_test.go +++ b/device/noise_test.go @@ -36,8 +36,14 @@ func TestNoiseHandshake(t *testing.T) { defer dev1.Close() defer dev2.Close() - peer1, _ := dev2.NewPeer(dev1.staticIdentity.privateKey.publicKey()) - peer2, _ := dev1.NewPeer(dev2.staticIdentity.privateKey.publicKey()) + peer1, err := dev2.NewPeer(dev1.staticIdentity.privateKey.publicKey()) + if err != nil { + t.Fatal(err) + } + peer2, err := dev1.NewPeer(dev2.staticIdentity.privateKey.publicKey()) + if err != nil { + t.Fatal(err) + } assertEqual( t,