X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fvideos%2Fsingle-server.ts;h=a0e4a156c584cc495ad29855c6a0ab8feee0207b;hb=a37e9e74ff07b057370d1ed6c0b391a02be8a6d2;hp=12c1f7b2f1703bdebdf7bef29884cbf288c1c9ea;hpb=89d241a79c262b9775c233b73cff080043ebb5e6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts index 12c1f7b2f..a0e4a156c 100644 --- a/server/tests/api/videos/single-server.ts +++ b/server/tests/api/videos/single-server.ts @@ -6,8 +6,8 @@ import { checkVideoFilesWereRemoved, cleanupTests, completeVideoCheck, - flushAndRunServer, - ServerInfo, + createSingleServer, + PeerTubeServer, setAccessTokensToServers, testImage, wait @@ -19,7 +19,7 @@ const expect = chai.expect describe('Test a single server', function () { function runSuite (mode: 'legacy' | 'resumable') { - let server: ServerInfo = null + let server: PeerTubeServer = null let videoId: number | string let videoId2: string let videoUUID = '' @@ -94,7 +94,7 @@ describe('Test a single server', function () { before(async function () { this.timeout(30000) - server = await flushAndRunServer(1) + server = await createSingleServer(1) await setAccessTokensToServers([ server ]) }) @@ -199,9 +199,10 @@ describe('Test a single server', function () { }) it('Should remove the video', async function () { + const video = await server.videos.get({ id: videoId }) await server.videos.remove({ id: videoId }) - await checkVideoFilesWereRemoved(videoUUID, server) + await checkVideoFilesWereRemoved({ video, server }) }) it('Should not have videos', async function () { @@ -353,19 +354,6 @@ describe('Test a single server', function () { await server.videos.update({ id: videoId, attributes }) }) - it('Should filter by tags and category', async function () { - { - const { data, total } = await server.videos.list({ tagsAllOf: [ 'tagup1', 'tagup2' ], categoryOneOf: [ 4 ] }) - expect(total).to.equal(1) - expect(data[0].name).to.equal('my super video updated') - } - - { - const { total } = await server.videos.list({ tagsAllOf: [ 'tagup1', 'tagup2' ], categoryOneOf: [ 3 ] }) - expect(total).to.equal(0) - } - }) - it('Should have the video updated', async function () { this.timeout(60000)