]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Use badStorage for TestPeerInvalidHave
authorMatt Joiner <anacrolix@gmail.com>
Mon, 18 Sep 2017 02:15:14 +0000 (12:15 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Mon, 18 Sep 2017 02:15:14 +0000 (12:15 +1000)
client_test.go

index 7324c49921c6afbd188da9d366e5183141fc7964..d420a78f4cb0f769a4473385b0bbb61b154b9e4e 100644 (file)
@@ -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)