describe('Check cleanup', function () {
it('Should have an empty cache directory', async function () {
- await checkPeerTubeRunnerCacheIsEmpty()
+ await checkPeerTubeRunnerCacheIsEmpty(peertubeRunner)
})
})
describe('Check cleanup', function () {
it('Should have an empty cache directory', async function () {
- await checkPeerTubeRunnerCacheIsEmpty()
+ await checkPeerTubeRunnerCacheIsEmpty(peertubeRunner)
})
})
})
it('Should transcode videos on manual run', async function () {
- this.timeout(240000)
+ this.timeout(360000)
await servers[0].config.disableTranscoding()
describe('Check cleanup', function () {
it('Should have an empty cache directory', async function () {
- await checkPeerTubeRunnerCacheIsEmpty()
+ await checkPeerTubeRunnerCacheIsEmpty(peertubeRunner)
})
})
import { homedir } from 'os'
import { join } from 'path'
import { PeerTubeServer } from '@shared/server-commands'
+import { PeerTubeRunnerProcess } from './peertube-runner-process'
export async function checkTmpIsEmpty (server: PeerTubeServer) {
await checkDirectoryIsEmpty(server, 'tmp', [ 'plugins-global.css', 'hls', 'resumable-uploads' ])
expect(filtered).to.have.lengthOf(0)
}
-export async function checkPeerTubeRunnerCacheIsEmpty () {
- const directoryPath = join(homedir(), '.cache', 'peertube-runner-nodejs', 'test', 'transcoding')
+export async function checkPeerTubeRunnerCacheIsEmpty (runner: PeerTubeRunnerProcess) {
+ const directoryPath = join(homedir(), '.cache', 'peertube-runner-nodejs', runner.getId(), 'transcoding')
const directoryExists = await pathExists(directoryPath)
expect(directoryExists).to.be.true
this.app = null
}
+ getId () {
+ return 'test-' + this.server.internalServerNumber
+ }
+
private getRunnerPath () {
return join(root(), 'packages', 'peertube-runner', 'dist', 'peertube-runner.js')
}
private buildIdArg () {
- return [ '--id', 'test-' + this.server.internalServerNumber ]
+ return [ '--id', this.getId() ]
}
}