torrent_test.go | 5 +++-- diff --git a/torrent_test.go b/torrent_test.go index c9ea5e42841f8834d1a7882b422f4ed3b95301d3..33eb49035cfc725c704722572cba0a3fc80f5baa 100644 --- a/torrent_test.go +++ b/torrent_test.go @@ -80,7 +80,7 @@ const ( numPieces = 13410 pieceLength = 256 << 10 ) - cl := &Client{} + cl := &Client{config: &ClientConfig{}} cl.initLogger() t := cl.newTorrent(metainfo.Hash{}, nil) require.NoError(b, t.setInfo(&metainfo.Info{ @@ -107,7 +107,7 @@ // Check that a torrent containing zero-length file(s) will start, and that // they're created in the filesystem. The client storage is assumed to be // file-based on the native filesystem based. -func testEmptyFilesAndZeroPieceLength(t *testing.T, cfg *Config) { +func testEmptyFilesAndZeroPieceLength(t *testing.T, cfg *ClientConfig) { cl, err := NewClient(cfg) require.NoError(t, err) defer cl.Close() @@ -149,6 +149,7 @@ func TestPieceHashFailed(t *testing.T) { mi := testutil.GreetingMetaInfo() cl := new(Client) + cl.config = &ClientConfig{} cl.initLogger() tt := cl.newTorrent(mi.HashInfoBytes(), badStorage{}) tt.setChunkSize(2)