From cfa54ead7c8113ee4b97c528079e4a251ea3d257 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Mon, 18 Sep 2017 12:15:14 +1000 Subject: [PATCH] Use badStorage for TestPeerInvalidHave --- client_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client_test.go b/client_test.go index 7324c499..d420a78f 100644 --- a/client_test.go +++ b/client_test.go @@ -517,6 +517,8 @@ func TestMergingTrackersByAddingSpecs(t *testing.T) { type badStorage struct{} +var _ storage.ClientImpl = badStorage{} + func (bs badStorage) OpenTorrent(*metainfo.Info, metainfo.Hash) (storage.TorrentImpl, error) { return bs, nil } @@ -917,6 +919,7 @@ func TestPeerInvalidHave(t *testing.T) { tt, _new, err := cl.AddTorrentSpec(&TorrentSpec{ InfoBytes: infoBytes, InfoHash: metainfo.HashBytes(infoBytes), + Storage: badStorage{}, }) require.NoError(t, err) assert.True(t, _new) -- 2.48.1