import { VideoPrivacy } from '../../../../shared/models/videos/video-privacy.enum'
import {
flushAndRunMultipleServers,
- flushTests,
getVideosList,
killallServers,
ServerInfo,
setAccessTokensToServers,
- uploadVideo,
- wait
-} from '../../utils/index'
-import { doubleFollow } from '../../utils/server/follows'
-import { userLogin } from '../../utils/users/login'
-import { createUser } from '../../utils/users/users'
-import { getMyVideos, getVideo, getVideoWithToken, updateVideo } from '../../utils/videos/videos'
+ uploadVideo
+} from '../../../../shared/utils/index'
+import { doubleFollow } from '../../../../shared/utils/server/follows'
+import { userLogin } from '../../../../shared/utils/users/login'
+import { createUser } from '../../../../shared/utils/users/users'
+import { getMyVideos, getVideo, getVideoWithToken, updateVideo } from '../../../../shared/utils/videos/videos'
+import { waitJobs } from '../../../../shared/utils/server/jobs'
const expect = chai.expect
}
await uploadVideo(servers[0].url, servers[0].accessToken, attributes)
- await wait(5000)
+ await waitJobs(servers)
})
it('Should not have this private video on server 2', async function () {
})
it('Should not be able to watch this private video with another user', async function () {
+ this.timeout(10000)
+
const user = {
username: 'hello',
password: 'super password'
await uploadVideo(servers[1].url, servers[1].accessToken, attributes)
// Server 2 has transcoding enabled
- await wait(10000)
+ await waitJobs(servers)
})
it('Should not have this unlisted video listed on server 1 and 2', async function () {
now = Date.now()
await updateVideo(servers[0].url, servers[0].accessToken, privateVideoId, attribute)
- await wait(5000)
+ await waitJobs(servers)
})
it('Should have this new public video listed on server 1 and 2', async function () {
after(async function () {
killallServers(servers)
-
- // Keep the logs if the test failed
- if (this['ok']) {
- await flushTests()
- }
})
})