aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/video-imports.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-16 09:47:51 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commit254d3579f5338f5fd775c17d15cdfc37078bcfb4 (patch)
treeeaeb13fda16c16e98cd6991d202b0ca6a4cbdb63 /server/tests/api/videos/video-imports.ts
parent89d241a79c262b9775c233b73cff080043ebb5e6 (diff)
downloadPeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.gz
PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.zst
PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.zip
Use an object to represent a server
Diffstat (limited to 'server/tests/api/videos/video-imports.ts')
-rw-r--r--server/tests/api/videos/video-imports.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/server/tests/api/videos/video-imports.ts b/server/tests/api/videos/video-imports.ts
index 8b6542aa4..4ef55c3af 100644
--- a/server/tests/api/videos/video-imports.ts
+++ b/server/tests/api/videos/video-imports.ts
@@ -6,9 +6,9 @@ import {
6 areHttpImportTestsDisabled, 6 areHttpImportTestsDisabled,
7 cleanupTests, 7 cleanupTests,
8 doubleFollow, 8 doubleFollow,
9 flushAndRunMultipleServers, 9 createMultipleServers,
10 ImportsCommand, 10 ImportsCommand,
11 ServerInfo, 11 PeerTubeServer,
12 setAccessTokensToServers, 12 setAccessTokensToServers,
13 testCaptionFile, 13 testCaptionFile,
14 testImage, 14 testImage,
@@ -19,13 +19,13 @@ import { VideoPrivacy, VideoResolution } from '@shared/models'
19const expect = chai.expect 19const expect = chai.expect
20 20
21describe('Test video imports', function () { 21describe('Test video imports', function () {
22 let servers: ServerInfo[] = [] 22 let servers: PeerTubeServer[] = []
23 let channelIdServer1: number 23 let channelIdServer1: number
24 let channelIdServer2: number 24 let channelIdServer2: number
25 25
26 if (areHttpImportTestsDisabled()) return 26 if (areHttpImportTestsDisabled()) return
27 27
28 async function checkVideosServer1 (server: ServerInfo, idHttp: string, idMagnet: string, idTorrent: string) { 28 async function checkVideosServer1 (server: PeerTubeServer, idHttp: string, idMagnet: string, idTorrent: string) {
29 const videoHttp = await server.videos.get({ id: idHttp }) 29 const videoHttp = await server.videos.get({ id: idHttp })
30 30
31 expect(videoHttp.name).to.equal('small video - youtube') 31 expect(videoHttp.name).to.equal('small video - youtube')
@@ -63,7 +63,7 @@ describe('Test video imports', function () {
63 expect(bodyCaptions.total).to.equal(2) 63 expect(bodyCaptions.total).to.equal(2)
64 } 64 }
65 65
66 async function checkVideoServer2 (server: ServerInfo, id: number | string) { 66 async function checkVideoServer2 (server: PeerTubeServer, id: number | string) {
67 const video = await server.videos.get({ id }) 67 const video = await server.videos.get({ id })
68 68
69 expect(video.name).to.equal('my super name') 69 expect(video.name).to.equal('my super name')
@@ -84,7 +84,7 @@ describe('Test video imports', function () {
84 this.timeout(30_000) 84 this.timeout(30_000)
85 85
86 // Run servers 86 // Run servers
87 servers = await flushAndRunMultipleServers(2) 87 servers = await createMultipleServers(2)
88 88
89 await setAccessTokensToServers(servers) 89 await setAccessTokensToServers(servers)
90 90