aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/multiple-pods.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-07-11 16:01:56 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-07-11 16:01:56 +0200
commit0a6658fdcbd779ada8f3758048c326e997902d5a (patch)
tree5de40bf901db0299011104b1344783637b964eb0 /server/tests/api/multiple-pods.js
parente6d4b0ff2404dcf0b3a755c3fcc415ffeb6e754d (diff)
downloadPeerTube-0a6658fdcbd779ada8f3758048c326e997902d5a.tar.gz
PeerTube-0a6658fdcbd779ada8f3758048c326e997902d5a.tar.zst
PeerTube-0a6658fdcbd779ada8f3758048c326e997902d5a.zip
Use global uuid instead of remoteId for videos
Diffstat (limited to 'server/tests/api/multiple-pods.js')
-rw-r--r--server/tests/api/multiple-pods.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/server/tests/api/multiple-pods.js b/server/tests/api/multiple-pods.js
index c3ee77f0c..1bc6157e8 100644
--- a/server/tests/api/multiple-pods.js
+++ b/server/tests/api/multiple-pods.js
@@ -20,6 +20,7 @@ const videosUtils = require('../utils/videos')
20describe('Test multiple pods', function () { 20describe('Test multiple pods', function () {
21 let servers = [] 21 let servers = []
22 const toRemove = [] 22 const toRemove = []
23 let videoUUID = ''
23 24
24 before(function (done) { 25 before(function (done) {
25 this.timeout(120000) 26 this.timeout(120000)
@@ -746,6 +747,36 @@ describe('Test multiple pods', function () {
746 expect(videos[0].name).not.to.equal(toRemove[1].name) 747 expect(videos[0].name).not.to.equal(toRemove[1].name)
747 expect(videos[1].name).not.to.equal(toRemove[1].name) 748 expect(videos[1].name).not.to.equal(toRemove[1].name)
748 749
750 videoUUID = videos[0].uuid
751
752 callback()
753 })
754 }, done)
755 })
756
757 it('Should get the same video by UUID on each pod', function (done) {
758 let baseVideo = null
759 each(servers, function (server, callback) {
760 videosUtils.getVideo(server.url, videoUUID, function (err, res) {
761 if (err) throw err
762
763 const video = res.body
764
765 if (baseVideo === null) {
766 baseVideo = video
767 return callback()
768 }
769
770 expect(baseVideo.name).to.equal(video.name)
771 expect(baseVideo.uuid).to.equal(video.uuid)
772 expect(baseVideo.category).to.equal(video.category)
773 expect(baseVideo.language).to.equal(video.language)
774 expect(baseVideo.licence).to.equal(video.licence)
775 expect(baseVideo.category).to.equal(video.category)
776 expect(baseVideo.nsfw).to.equal(video.nsfw)
777 expect(baseVideo.author).to.equal(video.author)
778 expect(baseVideo.tags).to.deep.equal(video.tags)
779
749 callback() 780 callback()
750 }) 781 })
751 }, done) 782 }, done)