aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/cli/update-host.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-10-24 19:41:30 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-10-26 09:11:38 +0200
commit5f04dd2f743961e0a06c29531cc3ccc9e4928d56 (patch)
treea73085d0d83affc2377b78a2c7c25bda08d26388 /server/tests/cli/update-host.ts
parent72c7248b6fdcdb2175e726ff51b42e7555f2bd84 (diff)
downloadPeerTube-5f04dd2f743961e0a06c29531cc3ccc9e4928d56.tar.gz
PeerTube-5f04dd2f743961e0a06c29531cc3ccc9e4928d56.tar.zst
PeerTube-5f04dd2f743961e0a06c29531cc3ccc9e4928d56.zip
Add video channel tests
Diffstat (limited to 'server/tests/cli/update-host.ts')
-rw-r--r--server/tests/cli/update-host.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/server/tests/cli/update-host.ts b/server/tests/cli/update-host.ts
index 7e1d3f658..4358f28e3 100644
--- a/server/tests/cli/update-host.ts
+++ b/server/tests/cli/update-host.ts
@@ -13,7 +13,8 @@ import {
13 ServerInfo, 13 ServerInfo,
14 setAccessTokensToServers, 14 setAccessTokensToServers,
15 uploadVideo, 15 uploadVideo,
16 wait 16 wait,
17 getVideo
17} from '../utils' 18} from '../utils'
18 19
19describe('Test update host scripts', function () { 20describe('Test update host scripts', function () {
@@ -55,13 +56,16 @@ describe('Test update host scripts', function () {
55 expect(videos).to.have.lengthOf(2) 56 expect(videos).to.have.lengthOf(2)
56 57
57 for (const video of videos) { 58 for (const video of videos) {
58 expect(video.files).to.have.lengthOf(4) 59 const res2 = await getVideo(server.url, video.id)
60 const videoDetails = res2.body
59 61
60 for (const file of video.files) { 62 expect(videoDetails.files).to.have.lengthOf(4)
63
64 for (const file of videoDetails.files) {
61 expect(file.magnetUri).to.contain('localhost%3A9002%2Ftracker%2Fsocket') 65 expect(file.magnetUri).to.contain('localhost%3A9002%2Ftracker%2Fsocket')
62 expect(file.magnetUri).to.contain('localhost%3A9002%2Fstatic%2Fwebseed%2F') 66 expect(file.magnetUri).to.contain('localhost%3A9002%2Fstatic%2Fwebseed%2F')
63 67
64 const torrent = await parseTorrentVideo(server, video.uuid, file.resolution) 68 const torrent = await parseTorrentVideo(server, videoDetails.uuid, file.resolution)
65 expect(torrent.announce[0]).to.equal('ws://localhost:9002/tracker/socket') 69 expect(torrent.announce[0]).to.equal('ws://localhost:9002/tracker/socket')
66 expect(torrent.urlList[0]).to.contain('http://localhost:9002/static/webseed') 70 expect(torrent.urlList[0]).to.contain('http://localhost:9002/static/webseed')
67 } 71 }