Fix storage tests

* reformat sources #JR1356
This commit is contained in:
Širhoe Biazhkovič
2021-11-26 18:43:23 +03:00
committed by Lawrence, Rendall
parent beb4736b86
commit 9122aefdd7
28 changed files with 1140 additions and 949 deletions

View File

@@ -2,7 +2,6 @@ package torrentapproval
import (
"context"
"encoding/hex"
"fmt"
"github.com/chihaya/chihaya/middleware"
"github.com/chihaya/chihaya/storage/memory"
@@ -83,10 +82,7 @@ func TestHandleAnnounce(t *testing.T) {
req := &bittorrent.AnnounceRequest{}
resp := &bittorrent.AnnounceResponse{}
hashbytes, err := hex.DecodeString(tt.ih)
require.Nil(t, err)
hashinfo, err := bittorrent.NewInfoHash(hashbytes)
hashinfo, err := bittorrent.NewInfoHash(tt.ih)
require.Nil(t, err)
req.InfoHash = hashinfo