You've already forked torrent-client
mirror of
https://github.com/veggiedefender/torrent-client.git
synced 2025-11-06 09:29:16 +02:00
Fix torrentfile TestOpen
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"flag"
|
"flag"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
@@ -14,10 +13,7 @@ import (
|
|||||||
var update = flag.Bool("update", false, "update .golden.json files")
|
var update = flag.Bool("update", false, "update .golden.json files")
|
||||||
|
|
||||||
func TestOpen(t *testing.T) {
|
func TestOpen(t *testing.T) {
|
||||||
input, err := os.Open("testdata/archlinux-2019.12.01-x86_64.iso.torrent")
|
torrent, err := Open("testdata/archlinux-2019.12.01-x86_64.iso.torrent")
|
||||||
require.Nil(t, err)
|
|
||||||
|
|
||||||
torrent, err := Open(input)
|
|
||||||
require.Nil(t, err)
|
require.Nil(t, err)
|
||||||
|
|
||||||
goldenPath := "testdata/archlinux-2019.12.01-x86_64.iso.torrent.golden.json"
|
goldenPath := "testdata/archlinux-2019.12.01-x86_64.iso.torrent.golden.json"
|
||||||
|
|||||||
Reference in New Issue
Block a user