diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-16 10:19:16 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | 59bbcced37005dd511daca9bd58ae2998cb931b1 (patch) | |
tree | 60d1ba7a8b2eac691f27c25cb5e2d0ae3a510c9d /server/tests/api/videos | |
parent | 254d3579f5338f5fd775c17d15cdfc37078bcfb4 (diff) | |
download | PeerTube-59bbcced37005dd511daca9bd58ae2998cb931b1.tar.gz PeerTube-59bbcced37005dd511daca9bd58ae2998cb931b1.tar.zst PeerTube-59bbcced37005dd511daca9bd58ae2998cb931b1.zip |
Centralize test URLs
Diffstat (limited to 'server/tests/api/videos')
-rw-r--r-- | server/tests/api/videos/video-imports.ts | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/server/tests/api/videos/video-imports.ts b/server/tests/api/videos/video-imports.ts index 4ef55c3af..192f5232e 100644 --- a/server/tests/api/videos/video-imports.ts +++ b/server/tests/api/videos/video-imports.ts | |||
@@ -5,9 +5,9 @@ import * as chai from 'chai' | |||
5 | import { | 5 | import { |
6 | areHttpImportTestsDisabled, | 6 | areHttpImportTestsDisabled, |
7 | cleanupTests, | 7 | cleanupTests, |
8 | doubleFollow, | ||
9 | createMultipleServers, | 8 | createMultipleServers, |
10 | ImportsCommand, | 9 | doubleFollow, |
10 | FIXTURE_URLS, | ||
11 | PeerTubeServer, | 11 | PeerTubeServer, |
12 | setAccessTokensToServers, | 12 | setAccessTokensToServers, |
13 | testCaptionFile, | 13 | testCaptionFile, |
@@ -110,7 +110,7 @@ describe('Test video imports', function () { | |||
110 | } | 110 | } |
111 | 111 | ||
112 | { | 112 | { |
113 | const attributes = { ...baseAttributes, targetUrl: ImportsCommand.getYoutubeVideoUrl() } | 113 | const attributes = { ...baseAttributes, targetUrl: FIXTURE_URLS.youtube } |
114 | const { video } = await servers[0].imports.importVideo({ attributes }) | 114 | const { video } = await servers[0].imports.importVideo({ attributes }) |
115 | expect(video.name).to.equal('small video - youtube') | 115 | expect(video.name).to.equal('small video - youtube') |
116 | 116 | ||
@@ -162,7 +162,7 @@ Ajouter un sous-titre est vraiment facile`) | |||
162 | { | 162 | { |
163 | const attributes = { | 163 | const attributes = { |
164 | ...baseAttributes, | 164 | ...baseAttributes, |
165 | magnetUri: ImportsCommand.getMagnetURI(), | 165 | magnetUri: FIXTURE_URLS.magnet, |
166 | description: 'this is a super torrent description', | 166 | description: 'this is a super torrent description', |
167 | tags: [ 'tag_torrent1', 'tag_torrent2' ] | 167 | tags: [ 'tag_torrent1', 'tag_torrent2' ] |
168 | } | 168 | } |
@@ -199,13 +199,13 @@ Ajouter un sous-titre est vraiment facile`) | |||
199 | 199 | ||
200 | expect(videoImports).to.have.lengthOf(3) | 200 | expect(videoImports).to.have.lengthOf(3) |
201 | 201 | ||
202 | expect(videoImports[2].targetUrl).to.equal(ImportsCommand.getYoutubeVideoUrl()) | 202 | expect(videoImports[2].targetUrl).to.equal(FIXTURE_URLS.youtube) |
203 | expect(videoImports[2].magnetUri).to.be.null | 203 | expect(videoImports[2].magnetUri).to.be.null |
204 | expect(videoImports[2].torrentName).to.be.null | 204 | expect(videoImports[2].torrentName).to.be.null |
205 | expect(videoImports[2].video.name).to.equal('small video - youtube') | 205 | expect(videoImports[2].video.name).to.equal('small video - youtube') |
206 | 206 | ||
207 | expect(videoImports[1].targetUrl).to.be.null | 207 | expect(videoImports[1].targetUrl).to.be.null |
208 | expect(videoImports[1].magnetUri).to.equal(ImportsCommand.getMagnetURI()) | 208 | expect(videoImports[1].magnetUri).to.equal(FIXTURE_URLS.magnet) |
209 | expect(videoImports[1].torrentName).to.be.null | 209 | expect(videoImports[1].torrentName).to.be.null |
210 | expect(videoImports[1].video.name).to.equal('super peertube2 video') | 210 | expect(videoImports[1].video.name).to.equal('super peertube2 video') |
211 | 211 | ||
@@ -234,7 +234,7 @@ Ajouter un sous-titre est vraiment facile`) | |||
234 | this.timeout(60_000) | 234 | this.timeout(60_000) |
235 | 235 | ||
236 | const attributes = { | 236 | const attributes = { |
237 | targetUrl: ImportsCommand.getYoutubeVideoUrl(), | 237 | targetUrl: FIXTURE_URLS.youtube, |
238 | channelId: channelIdServer2, | 238 | channelId: channelIdServer2, |
239 | privacy: VideoPrivacy.PUBLIC, | 239 | privacy: VideoPrivacy.PUBLIC, |
240 | category: 10, | 240 | category: 10, |
@@ -270,7 +270,7 @@ Ajouter un sous-titre est vraiment facile`) | |||
270 | 270 | ||
271 | const attributes = { | 271 | const attributes = { |
272 | name: 'transcoded video', | 272 | name: 'transcoded video', |
273 | magnetUri: ImportsCommand.getMagnetURI(), | 273 | magnetUri: FIXTURE_URLS.magnet, |
274 | channelId: channelIdServer2, | 274 | channelId: channelIdServer2, |
275 | privacy: VideoPrivacy.PUBLIC | 275 | privacy: VideoPrivacy.PUBLIC |
276 | } | 276 | } |
@@ -320,7 +320,7 @@ Ajouter un sous-titre est vraiment facile`) | |||
320 | 320 | ||
321 | const attributes = { | 321 | const attributes = { |
322 | name: 'hdr video', | 322 | name: 'hdr video', |
323 | targetUrl: ImportsCommand.getYoutubeHDRVideoUrl(), | 323 | targetUrl: FIXTURE_URLS.youtubeHDR, |
324 | channelId: channelIdServer1, | 324 | channelId: channelIdServer1, |
325 | privacy: VideoPrivacy.PUBLIC | 325 | privacy: VideoPrivacy.PUBLIC |
326 | } | 326 | } |