aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/video-privacy.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-17 12:05:59 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:52 +0100
commit975e6e0e44e2f2b25f804cd48a62e2a8d9e8117a (patch)
tree87ee25f3033f0fe0da76ee3649bb24cae0509c0e /server/tests/api/video-privacy.ts
parentafffe98839db7ccbfa9fb8b7d1413b97900fdc73 (diff)
downloadPeerTube-975e6e0e44e2f2b25f804cd48a62e2a8d9e8117a.tar.gz
PeerTube-975e6e0e44e2f2b25f804cd48a62e2a8d9e8117a.tar.zst
PeerTube-975e6e0e44e2f2b25f804cd48a62e2a8d9e8117a.zip
Fix video full description
Diffstat (limited to 'server/tests/api/video-privacy.ts')
-rw-r--r--server/tests/api/video-privacy.ts40
1 files changed, 20 insertions, 20 deletions
diff --git a/server/tests/api/video-privacy.ts b/server/tests/api/video-privacy.ts
index beac1613e..eb1e4f873 100644
--- a/server/tests/api/video-privacy.ts
+++ b/server/tests/api/video-privacy.ts
@@ -1,24 +1,24 @@
1/* tslint:disable:no-unused-expression */ 1/* tslint:disable:no-unused-expression */
2 2
3import 'mocha'
4import * as chai from 'chai' 3import * as chai from 'chai'
5const expect = chai.expect 4import 'mocha'
6 5import { VideoPrivacy } from '../../../shared/models/videos/video-privacy.enum'
7import { 6import {
8 ServerInfo, 7 flushAndRunMultipleServers,
9 flushTests, 8 flushTests,
10 uploadVideo,
11 makeFriends,
12 getVideosList, 9 getVideosList,
13 wait, 10 killallServers,
11 ServerInfo,
14 setAccessTokensToServers, 12 setAccessTokensToServers,
15 flushAndRunMultipleServers, 13 uploadVideo,
16 killallServers 14 wait
17} from '../utils' 15} from '../utils'
18import { VideoPrivacy } from '../../../shared/models/videos/video-privacy.enum' 16import { doubleFollow } from '../utils/follows'
19import { getMyVideos, getVideo, getVideoWithToken, updateVideo } from '../utils/videos'
20import { createUser } from '../utils/users'
21import { getUserAccessToken } from '../utils/login' 17import { getUserAccessToken } from '../utils/login'
18import { createUser } from '../utils/users'
19import { getMyVideos, getVideo, getVideoWithToken, updateVideo } from '../utils/videos'
20
21const expect = chai.expect
22 22
23describe('Test video privacy', function () { 23describe('Test video privacy', function () {
24 let servers: ServerInfo[] = [] 24 let servers: ServerInfo[] = []
@@ -35,11 +35,11 @@ describe('Test video privacy', function () {
35 // Get the access tokens 35 // Get the access tokens
36 await setAccessTokensToServers(servers) 36 await setAccessTokensToServers(servers)
37 37
38 // Pod 1 makes friend with pod 2 38 // Server 1 and server 2 follow each other
39 await makeFriends(servers[0].url, servers[0].accessToken) 39 await doubleFollow(servers[0], servers[1])
40 }) 40 })
41 41
42 it('Should upload a private video on pod 1', async function () { 42 it('Should upload a private video on server 1', async function () {
43 this.timeout(15000) 43 this.timeout(15000)
44 44
45 const attributes = { 45 const attributes = {
@@ -50,7 +50,7 @@ describe('Test video privacy', function () {
50 await wait(11000) 50 await wait(11000)
51 }) 51 })
52 52
53 it('Should not have this private video on pod 2', async function () { 53 it('Should not have this private video on server 2', async function () {
54 const res = await getVideosList(servers[1].url) 54 const res = await getVideosList(servers[1].url)
55 55
56 expect(res.body.total).to.equal(0) 56 expect(res.body.total).to.equal(0)
@@ -86,7 +86,7 @@ describe('Test video privacy', function () {
86 await getVideoWithToken(servers[0].url, servers[0].accessToken, privateVideoUUID) 86 await getVideoWithToken(servers[0].url, servers[0].accessToken, privateVideoUUID)
87 }) 87 })
88 88
89 it('Should upload a unlisted video on pod 2', async function () { 89 it('Should upload a unlisted video on server 2', async function () {
90 this.timeout(30000) 90 this.timeout(30000)
91 91
92 const attributes = { 92 const attributes = {
@@ -98,7 +98,7 @@ describe('Test video privacy', function () {
98 await wait(22000) 98 await wait(22000)
99 }) 99 })
100 100
101 it('Should not have this unlisted video listed on pod 1 and 2', async function () { 101 it('Should not have this unlisted video listed on server 1 and 2', async function () {
102 for (const server of servers) { 102 for (const server of servers) {
103 const res = await getVideosList(server.url) 103 const res = await getVideosList(server.url)
104 104
@@ -124,7 +124,7 @@ describe('Test video privacy', function () {
124 } 124 }
125 }) 125 })
126 126
127 it('Should update the private video to public on pod 1', async function () { 127 it('Should update the private video to public on server 1', async function () {
128 this.timeout(15000) 128 this.timeout(15000)
129 129
130 const attribute = { 130 const attribute = {
@@ -137,7 +137,7 @@ describe('Test video privacy', function () {
137 await wait(11000) 137 await wait(11000)
138 }) 138 })
139 139
140 it('Should not have this new unlisted video listed on pod 1 and 2', async function () { 140 it('Should not have this new unlisted video listed on server 1 and 2', async function () {
141 for (const server of servers) { 141 for (const server of servers) {
142 const res = await getVideosList(server.url) 142 const res = await getVideosList(server.url)
143 143