X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fvideos%2Fvideo-nsfw.ts;h=811705212b360f7878ee50b3bb3f161c2a807ce4;hb=913b1d71e630d5a959c763bf565a171b4dc61434;hp=df1ee2eb97d513deb72faf3a55b2b3f8f3bd471d;hpb=bc22d60899e14631cba0fb6450f4e85fc9528293;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/videos/video-nsfw.ts b/server/tests/api/videos/video-nsfw.ts index df1ee2eb9..811705212 100644 --- a/server/tests/api/videos/video-nsfw.ts +++ b/server/tests/api/videos/video-nsfw.ts @@ -9,10 +9,10 @@ import { ServerInfo, setAccessTokensToServers, uploadVideo -} from '../../../../shared/utils/index' -import { userLogin } from '../../../../shared/utils/users/login' -import { createUser } from '../../../../shared/utils/users/users' -import { getMyVideos } from '../../../../shared/utils/videos/videos' +} from '../../../../shared/extra-utils/index' +import { userLogin } from '../../../../shared/extra-utils/users/login' +import { createUser } from '../../../../shared/extra-utils/users/users' +import { getMyVideos } from '../../../../shared/extra-utils/videos/videos' import { getAccountVideos, getConfig, @@ -20,12 +20,12 @@ import { getMyUserInformation, getVideoChannelVideos, getVideosListWithToken, - runServer, + flushAndRunServer, searchVideo, searchVideoWithToken, updateCustomConfig, updateMyUser -} from '../../../../shared/utils' +} from '../../../../shared/extra-utils' import { ServerConfig } from '../../../../shared/models' import { CustomConfig } from '../../../../shared/models/server/custom-config.model' import { User } from '../../../../shared/models/users' @@ -64,9 +64,7 @@ describe('Test video NSFW policy', function () { before(async function () { this.timeout(50000) - - await flushTests() - server = await runServer(1) + server = await flushAndRunServer(1) // Get the access tokens await setAccessTokensToServers([ server ]) @@ -144,7 +142,7 @@ describe('Test video NSFW policy', function () { it('Should create a user having the default nsfw policy', async function () { const username = 'user1' const password = 'my super password' - await createUser(server.url, server.accessToken, username, password) + await createUser({ url: server.url, accessToken: server.accessToken, username: username, password: password }) userAccessToken = await userLogin(server, { username, password }) @@ -243,7 +241,7 @@ describe('Test video NSFW policy', function () { }) }) - after(async function () { + after(function () { killallServers([ server ]) }) })