]> Sergey Matveev's repositories - btrtrc.git/blobdiff - fs/torrentfs_test.go
Rework status export in tests to allow count > 1 without a server for every test
[btrtrc.git] / fs / torrentfs_test.go
index 8ac69bb70731e7285a6fa7a85c7f995e8ca9e106..fb326cc52ecba1f6d68b068b99e008c7c3957ac5 100644 (file)
@@ -174,7 +174,7 @@ func TestDownloadOnDemand(t *testing.T) {
        seeder, err := torrent.NewClient(cfg)
        require.NoError(t, err)
        defer seeder.Close()
-       testutil.ExportStatusWriter(seeder, "s")
+       defer testutil.ExportStatusWriter(seeder, "s")()
        // Just to mix things up, the seeder starts with the data, but the leecher
        // starts with the metainfo.
        seederTorrent, err := seeder.AddMagnet(fmt.Sprintf("magnet:?xt=urn:btih:%s", layout.Metainfo.HashInfoBytes().HexString()))