diff options
author | Chocobozzz <me@florianbigard.com> | 2020-07-30 09:43:12 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-07-31 11:32:04 +0200 |
commit | b488ba1e26b803ac6c637e8b11bdd444ca4c803f (patch) | |
tree | 0a9ce01fcfb26ecddd8a0dccf997514818b8a72f /server/tests/plugins | |
parent | b9fe9a7ffdf80d81c5580ccccfeb989051fd9d8a (diff) | |
download | PeerTube-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 'server/tests/plugins')
-rw-r--r-- | server/tests/plugins/filter-hooks.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/tests/plugins/filter-hooks.ts b/server/tests/plugins/filter-hooks.ts index 41242318e..4d354b68e 100644 --- a/server/tests/plugins/filter-hooks.ts +++ b/server/tests/plugins/filter-hooks.ts | |||
@@ -24,7 +24,7 @@ import { | |||
24 | waitJobs | 24 | waitJobs |
25 | } from '../../../shared/extra-utils' | 25 | } from '../../../shared/extra-utils' |
26 | import { cleanupTests, flushAndRunMultipleServers, ServerInfo } from '../../../shared/extra-utils/server/servers' | 26 | import { cleanupTests, flushAndRunMultipleServers, ServerInfo } from '../../../shared/extra-utils/server/servers' |
27 | import { getMyVideoImports, getYoutubeVideoUrl, importVideo } from '../../../shared/extra-utils/videos/video-imports' | 27 | import { getGoodVideoUrl, getMyVideoImports, importVideo } from '../../../shared/extra-utils/videos/video-imports' |
28 | import { VideoDetails, VideoImport, VideoImportState, VideoPrivacy } from '../../../shared/models/videos' | 28 | import { VideoDetails, VideoImport, VideoImportState, VideoPrivacy } from '../../../shared/models/videos' |
29 | import { VideoCommentThreadTree } from '../../../shared/models/videos/video-comment.model' | 29 | import { VideoCommentThreadTree } from '../../../shared/models/videos/video-comment.model' |
30 | 30 | ||
@@ -92,7 +92,7 @@ describe('Test plugin filter hooks', function () { | |||
92 | name: 'normal title', | 92 | name: 'normal title', |
93 | privacy: VideoPrivacy.PUBLIC, | 93 | privacy: VideoPrivacy.PUBLIC, |
94 | channelId: servers[0].videoChannel.id, | 94 | channelId: servers[0].videoChannel.id, |
95 | targetUrl: getYoutubeVideoUrl() + 'bad' | 95 | targetUrl: getGoodVideoUrl() + 'bad' |
96 | } | 96 | } |
97 | await importVideo(servers[0].url, servers[0].accessToken, baseAttributes, 403) | 97 | await importVideo(servers[0].url, servers[0].accessToken, baseAttributes, 403) |
98 | }) | 98 | }) |
@@ -117,7 +117,7 @@ describe('Test plugin filter hooks', function () { | |||
117 | name: 'title with bad word', | 117 | name: 'title with bad word', |
118 | privacy: VideoPrivacy.PUBLIC, | 118 | privacy: VideoPrivacy.PUBLIC, |
119 | channelId: servers[0].videoChannel.id, | 119 | channelId: servers[0].videoChannel.id, |
120 | targetUrl: getYoutubeVideoUrl() | 120 | targetUrl: getGoodVideoUrl() |
121 | } | 121 | } |
122 | const res = await importVideo(servers[0].url, servers[0].accessToken, baseAttributes) | 122 | const res = await importVideo(servers[0].url, servers[0].accessToken, baseAttributes) |
123 | videoImportId = res.body.id | 123 | videoImportId = res.body.id |
@@ -220,7 +220,7 @@ describe('Test plugin filter hooks', function () { | |||
220 | 220 | ||
221 | const attributes = { | 221 | const attributes = { |
222 | name: 'video please blacklist me', | 222 | name: 'video please blacklist me', |
223 | targetUrl: getYoutubeVideoUrl(), | 223 | targetUrl: getGoodVideoUrl(), |
224 | channelId: servers[0].videoChannel.id | 224 | channelId: servers[0].videoChannel.id |
225 | } | 225 | } |
226 | const res = await importVideo(servers[0].url, servers[0].accessToken, attributes) | 226 | const res = await importVideo(servers[0].url, servers[0].accessToken, attributes) |