X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=server%2Ftests%2Fapi%2Fvideos%2Fvideo-change-ownership.ts;h=dee6575b92f6f078943333ca0873f36dc175ac34;hb=338eb9d33af690db716805fd2277bf68f473b58f;hp=1c0327d4089043edd680b26777c3673cc0e4e836;hpb=97567dd81f508dd6295ac4d73d849aa2ce0a6549;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/videos/video-change-ownership.ts b/server/tests/api/videos/video-change-ownership.ts index 1c0327d40..dee6575b9 100644 --- a/server/tests/api/videos/video-change-ownership.ts +++ b/server/tests/api/videos/video-change-ownership.ts @@ -1,10 +1,11 @@ -/* tslint:disable:no-unused-expression */ +/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ import * as chai from 'chai' import 'mocha' import { acceptChangeOwnership, - changeVideoOwnership, cleanupTests, + changeVideoOwnership, + cleanupTests, createUser, doubleFollow, flushAndRunMultipleServers, @@ -13,7 +14,6 @@ import { getVideo, getVideoChangeOwnershipList, getVideosList, - killallServers, refuseChangeOwnership, ServerInfo, setAccessTokensToServers, @@ -38,7 +38,7 @@ describe('Test video change ownership - nominal', function () { } let firstUserAccessToken = '' let secondUserAccessToken = '' - let lastRequestChangeOwnershipId = undefined + let lastRequestChangeOwnershipId = '' before(async function () { this.timeout(50000) @@ -48,15 +48,15 @@ describe('Test video change ownership - nominal', function () { const videoQuota = 42000000 await createUser({ - url: servers[ 0 ].url, - accessToken: servers[ 0 ].accessToken, + url: servers[0].url, + accessToken: servers[0].accessToken, username: firstUser.username, password: firstUser.password, videoQuota: videoQuota }) await createUser({ - url: servers[ 0 ].url, - accessToken: servers[ 0 ].accessToken, + url: servers[0].url, + accessToken: servers[0].accessToken, username: secondUser.username, password: secondUser.password, videoQuota: videoQuota @@ -191,7 +191,7 @@ describe('Test video change ownership - nominal', function () { await waitJobs(servers) }) - it('Should have video channel updated', async function () { + it('Should have the channel of the video updated', async function () { for (const server of servers) { const res = await getVideo(server.url, servers[0].video.uuid) @@ -203,13 +203,13 @@ describe('Test video change ownership - nominal', function () { } }) - after(function () { - killallServers(servers) + after(async function () { + await cleanupTests(servers) }) }) describe('Test video change ownership - quota too small', function () { - let server: ServerInfo = undefined + let server: ServerInfo const firstUser = { username: 'first', password: 'My great password' @@ -220,14 +220,14 @@ describe('Test video change ownership - quota too small', function () { } let firstUserAccessToken = '' let secondUserAccessToken = '' - let lastRequestChangeOwnershipId = undefined + let lastRequestChangeOwnershipId = '' before(async function () { this.timeout(50000) // Run one server server = await flushAndRunServer(1) - await setAccessTokensToServers([server]) + await setAccessTokensToServers([ server ]) const videoQuota = 42000000 const limitedVideoQuota = 10