diff options
author | Josh Bleecher Snyder <josh@tailscale.com> | 2021-01-12 17:27:27 -0800 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-01-20 19:57:01 +0100 |
commit | 23642a13bed48c700144e4b346d054b8e47879a8 (patch) | |
tree | 6c579ad70b6cc2b7053db9db030993be4d92dbb8 /device/noise_test.go | |
parent | 2fe19ce54db258d8c47ff03d8335fd28c7c7ad0f (diff) |
device: check returned errors from NewPeer in TestNoiseHandshake
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
Diffstat (limited to 'device/noise_test.go')
-rw-r--r-- | device/noise_test.go | 10 |
1 files 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, |