X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=server%2Ftests%2Fplugins%2Fplugin-transcoding.ts;h=5ab6864729327883a6081346eb9f4973daf0a7fc;hb=743dab5517d4501f6b35cfc795de6c8b6f41ebb3;hp=c14c34c7ec774dd22714d8ec805f8c1cb7e7da4f;hpb=13e13377918b65c30b9334920fef4b43e70b964e;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/plugins/plugin-transcoding.ts b/server/tests/plugins/plugin-transcoding.ts index c14c34c7e..5ab686472 100644 --- a/server/tests/plugins/plugin-transcoding.ts +++ b/server/tests/plugins/plugin-transcoding.ts @@ -2,7 +2,6 @@ import 'mocha' import { expect } from 'chai' -import { join } from 'path' import { getAudioStream, getVideoFileFPS, getVideoStreamFromFile } from '@server/helpers/ffprobe-utils' import { cleanupTests, @@ -13,7 +12,7 @@ import { setDefaultVideoChannel, testFfmpegStreamError, waitJobs -} from '@shared/extra-utils' +} from '@shared/server-commands' import { VideoPrivacy } from '@shared/models' async function createLiveWrapper (server: PeerTubeServer) { @@ -247,7 +246,9 @@ describe('Test transcoding plugins', function () { const videoUUID = (await server.videos.quickUpload({ name: 'video', fixture: 'video_very_short_240p.mp4' })).uuid await waitJobs([ server ]) - const path = server.servers.buildDirectory(join('videos', videoUUID + '-240.mp4')) + const video = await server.videos.get({ id: videoUUID }) + + const path = server.servers.buildWebTorrentFilePath(video.files[0].fileUrl) const audioProbe = await getAudioStream(path) expect(audioProbe.audioStream.codec_name).to.equal('opus')