X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fvideos%2Fvideo-privacy.ts;h=08b624ff342c2cbb8765a12aadb99bb79599bd51;hb=d17d743051c5716e1e08cd8870d718cfd6a57f0c;hp=5ec62615554e4980629a65755d9e10db06345052;hpb=254d3579f5338f5fd775c17d15cdfc37078bcfb4;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/videos/video-privacy.ts b/server/tests/api/videos/video-privacy.ts index 5ec626155..08b624ff3 100644 --- a/server/tests/api/videos/video-privacy.ts +++ b/server/tests/api/videos/video-privacy.ts @@ -2,9 +2,16 @@ import 'mocha' import * as chai from 'chai' -import { HttpStatusCode } from '@shared/core-utils' -import { cleanupTests, doubleFollow, createSingleServer, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils' -import { VideoCreateResult, VideoPrivacy } from '@shared/models' +import { + cleanupTests, + createSingleServer, + doubleFollow, + PeerTubeServer, + setAccessTokensToServers, + wait, + waitJobs +} from '@shared/extra-utils' +import { HttpStatusCode, VideoCreateResult, VideoPrivacy } from '@shared/models' const expect = chai.expect @@ -162,7 +169,7 @@ describe('Test video privacy', function () { }) it('Should not be able to get this unlisted video using its id', async function () { - await servers[1].videos.get({ id: unlistedVideo.id, expectedStatus: HttpStatusCode.BAD_REQUEST_400 }) + await servers[1].videos.get({ id: unlistedVideo.id, expectedStatus: HttpStatusCode.NOT_FOUND_404 }) }) it('Should be able to get this unlisted video using its uuid/shortUUID', async function () { @@ -210,7 +217,7 @@ describe('Test video privacy', function () { describe('Privacy update', function () { it('Should update the private and internal videos to public on server 1', async function () { - this.timeout(10000) + this.timeout(100000) now = Date.now() @@ -231,6 +238,7 @@ describe('Test video privacy', function () { await servers[0].videos.update({ id: internalVideoId, attributes }) } + await wait(10000) await waitJobs(servers) })