Make most tests work again
This commit is contained in:
@ -22,7 +22,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
testVideoRawURL = "https://www.youtube.com/watch?v=C0DPdy98e4c"
|
testVideoRawURL = "https://vimeo.com/454525548"
|
||||||
playlistRawURL = "https://soundcloud.com/mattheis/sets/kindred-phenomena"
|
playlistRawURL = "https://soundcloud.com/mattheis/sets/kindred-phenomena"
|
||||||
channelRawURL = "https://www.youtube.com/channel/UCHDm-DKoMyJxKVgwGmuTaQA"
|
channelRawURL = "https://www.youtube.com/channel/UCHDm-DKoMyJxKVgwGmuTaQA"
|
||||||
subtitlesTestVideoRawURL = "https://www.youtube.com/watch?v=QRS8MkLhQmM"
|
subtitlesTestVideoRawURL = "https://www.youtube.com/watch?v=QRS8MkLhQmM"
|
||||||
@ -139,7 +139,7 @@ func TestParseInfo(t *testing.T) {
|
|||||||
}{
|
}{
|
||||||
{"https://soundcloud.com/avalonemerson/avalon-emerson-live-at-printworks-london-march-2017", "Avalon Emerson Live at Printworks London 2017"},
|
{"https://soundcloud.com/avalonemerson/avalon-emerson-live-at-printworks-london-march-2017", "Avalon Emerson Live at Printworks London 2017"},
|
||||||
{"https://www.infoq.com/presentations/Simple-Made-Easy", "Simple Made Easy - InfoQ"},
|
{"https://www.infoq.com/presentations/Simple-Made-Easy", "Simple Made Easy - InfoQ"},
|
||||||
{"https://www.youtube.com/watch?v=uVYWQJ5BB_w", "A Radiolab Producer on the Making of a Podcast"},
|
{"https://vimeo.com/454525548", "Sample Video - 3 minutemp4.mp4"},
|
||||||
} {
|
} {
|
||||||
t.Run(c.url, func(t *testing.T) {
|
t.Run(c.url, func(t *testing.T) {
|
||||||
defer leakChecks(t)()
|
defer leakChecks(t)()
|
||||||
@ -221,6 +221,8 @@ func TestPlaylist(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestChannel(t *testing.T) {
|
func TestChannel(t *testing.T) {
|
||||||
|
t.Skip("skip youtube for now")
|
||||||
|
|
||||||
defer leakChecks(t)()
|
defer leakChecks(t)()
|
||||||
|
|
||||||
ydlResult, ydlResultErr := goutubedl.New(
|
ydlResult, ydlResultErr := goutubedl.New(
|
||||||
@ -267,6 +269,8 @@ func TestUnsupportedURL(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestPlaylistWithPrivateVideo(t *testing.T) {
|
func TestPlaylistWithPrivateVideo(t *testing.T) {
|
||||||
|
t.Skip("skip youtube for now")
|
||||||
|
|
||||||
defer leaktest.Check(t)()
|
defer leaktest.Check(t)()
|
||||||
|
|
||||||
playlistRawURL := "https://www.youtube.com/playlist?list=PLX0g748fkegS54oiDN4AXKl7BR7mLIydP"
|
playlistRawURL := "https://www.youtube.com/playlist?list=PLX0g748fkegS54oiDN4AXKl7BR7mLIydP"
|
||||||
@ -287,6 +291,8 @@ func TestPlaylistWithPrivateVideo(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestSubtitles(t *testing.T) {
|
func TestSubtitles(t *testing.T) {
|
||||||
|
t.Skip("skip youtube for now")
|
||||||
|
|
||||||
defer leakChecks(t)()
|
defer leakChecks(t)()
|
||||||
|
|
||||||
ydlResult, ydlResultErr := goutubedl.New(
|
ydlResult, ydlResultErr := goutubedl.New(
|
||||||
@ -332,7 +338,7 @@ func TestDownloadSections(t *testing.T) {
|
|||||||
|
|
||||||
ydlResult, ydlResultErr := goutubedl.New(
|
ydlResult, ydlResultErr := goutubedl.New(
|
||||||
context.Background(),
|
context.Background(),
|
||||||
"https://www.youtube.com/watch?v=OyuL5biOQ94",
|
"https://vimeo.com/454525548",
|
||||||
goutubedl.Options{
|
goutubedl.Options{
|
||||||
DownloadSections: fmt.Sprintf("*0:0-0:%d", duration),
|
DownloadSections: fmt.Sprintf("*0:0-0:%d", duration),
|
||||||
})
|
})
|
||||||
@ -343,7 +349,7 @@ func TestDownloadSections(t *testing.T) {
|
|||||||
if ydlResultErr != nil {
|
if ydlResultErr != nil {
|
||||||
t.Errorf("failed to download: %s", ydlResultErr)
|
t.Errorf("failed to download: %s", ydlResultErr)
|
||||||
}
|
}
|
||||||
dr, err := ydlResult.Download(context.Background(), "best")
|
dr, err := ydlResult.Download(context.Background(), "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
@ -554,6 +560,8 @@ func TestDownloadPlaylistEntry(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestFormatDownloadError(t *testing.T) {
|
func TestFormatDownloadError(t *testing.T) {
|
||||||
|
t.Skip("test URL broken")
|
||||||
|
|
||||||
defer leaktest.Check(t)()
|
defer leaktest.Check(t)()
|
||||||
|
|
||||||
ydl, ydlErr := goutubedl.New(
|
ydl, ydlErr := goutubedl.New(
|
||||||
|
Reference in New Issue
Block a user