Skip to content
This repository has been archived by the owner on Jan 4, 2025. It is now read-only.

Commit

Permalink
update test data
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Robinson committed Aug 16, 2019
1 parent bd4a881 commit 855f469
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions rtorrent/rtorrent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func TestRTorrent(t *testing.T) {

t.Run("add", func(t *testing.T) {
t.Run("by url", func(t *testing.T) {
err := client.Add("http://releases.ubuntu.com/18.10/ubuntu-18.10-live-server-amd64.iso.torrent")
err := client.Add("http://releases.ubuntu.com/19.04/ubuntu-19.04-live-server-amd64.iso.torrent")
require.NoError(t, err)

t.Run("get torrent", func(t *testing.T) {
Expand All @@ -83,11 +83,11 @@ func TestRTorrent(t *testing.T) {
}
require.NotEmpty(t, torrents)
require.Len(t, torrents, 1)
require.Equal(t, "8C4ADBF9EBE66F1D804FB6A4FB9B74966C3AB609", torrents[0].Hash)
require.Equal(t, "ubuntu-18.10-live-server-amd64.iso", torrents[0].Name)
require.Equal(t, "B7B0FBAB74A85D4AC170662C645982A862826455", torrents[0].Hash)
require.Equal(t, "ubuntu-19.04-live-server-amd64.iso", torrents[0].Name)
require.Equal(t, "", torrents[0].Label)
require.Equal(t, 923795456, torrents[0].Size)
require.Equal(t, "/downloads/incoming/ubuntu-18.10-live-server-amd64.iso", torrents[0].Path)
require.Equal(t, 784334848, torrents[0].Size)
require.Equal(t, "/downloads/incoming/ubuntu-19.04-live-server-amd64.iso", torrents[0].Path)
require.False(t, torrents[0].Completed)

t.Run("get files", func(t *testing.T) {
Expand Down Expand Up @@ -191,7 +191,7 @@ func TestRTorrent(t *testing.T) {
})

t.Run("with data", func(t *testing.T) {
b, err := ioutil.ReadFile("testdata/ubuntu-18.10-live-server-amd64.iso.torrent")
b, err := ioutil.ReadFile("testdata/ubuntu-19.04-live-server-amd64.iso.torrent")
require.NoError(t, err)
require.NotEmpty(t, b)

Expand All @@ -217,11 +217,11 @@ func TestRTorrent(t *testing.T) {
}
require.NotEmpty(t, torrents)
require.Len(t, torrents, 1)
require.Equal(t, "8C4ADBF9EBE66F1D804FB6A4FB9B74966C3AB609", torrents[0].Hash)
require.Equal(t, "ubuntu-18.10-live-server-amd64.iso", torrents[0].Name)
require.Equal(t, "B7B0FBAB74A85D4AC170662C645982A862826455", torrents[0].Hash)
require.Equal(t, "ubuntu-19.04-live-server-amd64.iso", torrents[0].Name)
require.Equal(t, "", torrents[0].Label)
require.Equal(t, 923795456, torrents[0].Size)
require.Equal(t, "/downloads/incoming/ubuntu-18.10-live-server-amd64.iso", torrents[0].Path)
require.Equal(t, 784334848, torrents[0].Size)
require.Equal(t, "/downloads/incoming/ubuntu-19.04-live-server-amd64.iso", torrents[0].Path)
require.False(t, torrents[0].Completed)

t.Run("get files", func(t *testing.T) {
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit 855f469

Please sign in to comment.