diff options
Diffstat (limited to 'server/tests/api/videos/video-privacy.ts')
-rw-r--r-- | server/tests/api/videos/video-privacy.ts | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/server/tests/api/videos/video-privacy.ts b/server/tests/api/videos/video-privacy.ts index ea435d5af..9fefca7e3 100644 --- a/server/tests/api/videos/video-privacy.ts +++ b/server/tests/api/videos/video-privacy.ts | |||
@@ -5,18 +5,17 @@ import 'mocha' | |||
5 | import { VideoPrivacy } from '../../../../shared/models/videos/video-privacy.enum' | 5 | import { VideoPrivacy } from '../../../../shared/models/videos/video-privacy.enum' |
6 | import { | 6 | import { |
7 | flushAndRunMultipleServers, | 7 | flushAndRunMultipleServers, |
8 | flushTests, | ||
9 | getVideosList, | 8 | getVideosList, |
10 | killallServers, | 9 | killallServers, |
11 | ServerInfo, | 10 | ServerInfo, |
12 | setAccessTokensToServers, | 11 | setAccessTokensToServers, |
13 | uploadVideo, | 12 | uploadVideo |
14 | wait | ||
15 | } from '../../utils/index' | 13 | } from '../../utils/index' |
16 | import { doubleFollow } from '../../utils/server/follows' | 14 | import { doubleFollow } from '../../utils/server/follows' |
17 | import { userLogin } from '../../utils/users/login' | 15 | import { userLogin } from '../../utils/users/login' |
18 | import { createUser } from '../../utils/users/users' | 16 | import { createUser } from '../../utils/users/users' |
19 | import { getMyVideos, getVideo, getVideoWithToken, updateVideo } from '../../utils/videos/videos' | 17 | import { getMyVideos, getVideo, getVideoWithToken, updateVideo } from '../../utils/videos/videos' |
18 | import { waitJobs } from '../../utils/server/jobs' | ||
20 | 19 | ||
21 | const expect = chai.expect | 20 | const expect = chai.expect |
22 | 21 | ||
@@ -48,7 +47,7 @@ describe('Test video privacy', function () { | |||
48 | } | 47 | } |
49 | await uploadVideo(servers[0].url, servers[0].accessToken, attributes) | 48 | await uploadVideo(servers[0].url, servers[0].accessToken, attributes) |
50 | 49 | ||
51 | await wait(5000) | 50 | await waitJobs(servers) |
52 | }) | 51 | }) |
53 | 52 | ||
54 | it('Should not have this private video on server 2', async function () { | 53 | it('Should not have this private video on server 2', async function () { |
@@ -99,7 +98,7 @@ describe('Test video privacy', function () { | |||
99 | await uploadVideo(servers[1].url, servers[1].accessToken, attributes) | 98 | await uploadVideo(servers[1].url, servers[1].accessToken, attributes) |
100 | 99 | ||
101 | // Server 2 has transcoding enabled | 100 | // Server 2 has transcoding enabled |
102 | await wait(10000) | 101 | await waitJobs(servers) |
103 | }) | 102 | }) |
104 | 103 | ||
105 | it('Should not have this unlisted video listed on server 1 and 2', async function () { | 104 | it('Should not have this unlisted video listed on server 1 and 2', async function () { |
@@ -139,7 +138,7 @@ describe('Test video privacy', function () { | |||
139 | now = Date.now() | 138 | now = Date.now() |
140 | await updateVideo(servers[0].url, servers[0].accessToken, privateVideoId, attribute) | 139 | await updateVideo(servers[0].url, servers[0].accessToken, privateVideoId, attribute) |
141 | 140 | ||
142 | await wait(5000) | 141 | await waitJobs(servers) |
143 | }) | 142 | }) |
144 | 143 | ||
145 | it('Should have this new public video listed on server 1 and 2', async function () { | 144 | it('Should have this new public video listed on server 1 and 2', async function () { |
@@ -155,10 +154,5 @@ describe('Test video privacy', function () { | |||
155 | 154 | ||
156 | after(async function () { | 155 | after(async function () { |
157 | killallServers(servers) | 156 | killallServers(servers) |
158 | |||
159 | // Keep the logs if the test failed | ||
160 | if (this['ok']) { | ||
161 | await flushTests() | ||
162 | } | ||
163 | }) | 157 | }) |
164 | }) | 158 | }) |