aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-07-05 21:36:01 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-07-05 21:36:01 +0200
commit6666aad4599a78f98f39409ec0d45391da7bd2d0 (patch)
tree2935754fb62522b085ffb41af2592b7a9a56e5ac /server/tests/api
parent0890478c5c259bb787dc7f847e38be081df7c8e1 (diff)
downloadPeerTube-6666aad4599a78f98f39409ec0d45391da7bd2d0.tar.gz
PeerTube-6666aad4599a78f98f39409ec0d45391da7bd2d0.tar.zst
PeerTube-6666aad4599a78f98f39409ec0d45391da7bd2d0.zip
Fix requests ordering between pods
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/utils.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/server/tests/api/utils.js b/server/tests/api/utils.js
index e0068eada..7c8698a0a 100644
--- a/server/tests/api/utils.js
+++ b/server/tests/api/utils.js
@@ -10,6 +10,7 @@ const request = require('supertest')
10const testUtils = { 10const testUtils = {
11 dateIsValid: dateIsValid, 11 dateIsValid: dateIsValid,
12 flushTests: flushTests, 12 flushTests: flushTests,
13 getAllVideosListBy: getAllVideosListBy,
13 getFriendsList: getFriendsList, 14 getFriendsList: getFriendsList,
14 getVideo: getVideo, 15 getVideo: getVideo,
15 getVideosList: getVideosList, 16 getVideosList: getVideosList,
@@ -45,6 +46,20 @@ function flushTests (callback) {
45 exec('npm run clean:server:test', callback) 46 exec('npm run clean:server:test', callback)
46} 47}
47 48
49function getAllVideosListBy (url, end) {
50 const path = '/api/v1/videos'
51
52 request(url)
53 .get(path)
54 .query({ sort: 'createdDate' })
55 .query({ start: 0 })
56 .query({ count: 10000 })
57 .set('Accept', 'application/json')
58 .expect(200)
59 .expect('Content-Type', /json/)
60 .end(end)
61}
62
48function getFriendsList (url, end) { 63function getFriendsList (url, end) {
49 const path = '/api/v1/pods/' 64 const path = '/api/v1/pods/'
50 65