aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-07-30 09:43:12 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-07-31 11:32:04 +0200
commitb488ba1e26b803ac6c637e8b11bdd444ca4c803f (patch)
tree0a9ce01fcfb26ecddd8a0dccf997514818b8a72f /shared/extra-utils/videos
parentb9fe9a7ffdf80d81c5580ccccfeb989051fd9d8a (diff)
downloadPeerTube-b488ba1e26b803ac6c637e8b11bdd444ca4c803f.tar.gz
PeerTube-b488ba1e26b803ac6c637e8b11bdd444ca4c803f.tar.zst
PeerTube-b488ba1e26b803ac6c637e8b11bdd444ca4c803f.zip
Don't rely on youtube for tests
Use another import URL when possible, and disable import tests when we want to do a youtube import test
Diffstat (limited to 'shared/extra-utils/videos')
-rw-r--r--shared/extra-utils/videos/video-imports.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/shared/extra-utils/videos/video-imports.ts b/shared/extra-utils/videos/video-imports.ts
index d235181b0..6249e8a94 100644
--- a/shared/extra-utils/videos/video-imports.ts
+++ b/shared/extra-utils/videos/video-imports.ts
@@ -15,6 +15,10 @@ function getBadVideoUrl () {
15 return 'https://download.cpy.re/peertube/bad_video.mp4' 15 return 'https://download.cpy.re/peertube/bad_video.mp4'
16} 16}
17 17
18function getGoodVideoUrl () {
19 return 'https://download.cpy.re/peertube/good_video.mp4'
20}
21
18function importVideo (url: string, token: string, attributes: VideoImportCreate & { torrentfile?: string }, statusCodeExpected = 200) { 22function importVideo (url: string, token: string, attributes: VideoImportCreate & { torrentfile?: string }, statusCodeExpected = 200) {
19 const path = '/api/v1/videos/imports' 23 const path = '/api/v1/videos/imports'
20 24
@@ -53,5 +57,6 @@ export {
53 getYoutubeVideoUrl, 57 getYoutubeVideoUrl,
54 importVideo, 58 importVideo,
55 getMagnetURI, 59 getMagnetURI,
56 getMyVideoImports 60 getMyVideoImports,
61 getGoodVideoUrl
57} 62}