}),
// Directories
- removeCacheDirectories()
+ removeCacheAndTmpDirectories()
.then(() => createDirectoriesIfNotExist())
])
} catch (err) {
// ---------------------------------------------------------------------------
-function removeCacheDirectories () {
+function removeCacheAndTmpDirectories () {
const cacheDirectories = Object.keys(CACHE)
.map(k => CACHE[k].DIRECTORY)
tasks.push(remove(dir))
}
+ tasks.push(remove(CONFIG.STORAGE.TMP_DIR))
+
return Promise.all(tasks)
}
import 'mocha'
import { Account } from '../../../../shared/models/actors'
import {
+ checkTmpIsEmpty,
checkVideoFilesWereRemoved,
createUser,
doubleFollow,
}
})
+ it('Should have an empty tmp directory', async function () {
+ for (const server of servers) {
+ await checkTmpIsEmpty(server)
+ }
+ })
+
after(async function () {
killallServers(servers)
})