From: Matt Joiner Date: Mon, 18 Sep 2017 02:15:14 +0000 (+1000) Subject: Use badStorage for TestPeerInvalidHave X-Git-Tag: v1.0.0~386 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=cfa54ead7c8113ee4b97c528079e4a251ea3d257;p=btrtrc.git Use badStorage for TestPeerInvalidHave --- 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)