Add hook filters tests

This commit is contained in:
Chocobozzz
2019-07-19 17:30:41 +02:00
committed by Chocobozzz
parent 09071200c7
commit 89cd127560
18 changed files with 306 additions and 80 deletions

View File

@@ -201,6 +201,10 @@ function getPluginPackageJSON (server: ServerInfo, npmName: string) {
return readJSON(path)
}
function getPluginTestPath (suffix = '') {
return join(root(), 'server', 'tests', 'fixtures', 'peertube-plugin-test' + suffix)
}
export {
listPlugins,
listAvailablePlugins,
@@ -213,5 +217,6 @@ export {
getPluginRegisteredSettings,
getPackageJSONPath,
updatePluginPackageJSON,
getPluginPackageJSON
getPluginPackageJSON,
getPluginTestPath
}

View File

@@ -171,7 +171,8 @@ async function runServer (server: ServerInfo, configOverrideArg?: any, args = []
thumbnails: `test${server.internalServerNumber}/thumbnails/`,
torrents: `test${server.internalServerNumber}/torrents/`,
captions: `test${server.internalServerNumber}/captions/`,
cache: `test${server.internalServerNumber}/cache/`
cache: `test${server.internalServerNumber}/cache/`,
plugins: `test${server.internalServerNumber}/plugins/`
},
admin: {
email: `admin${server.internalServerNumber}@example.com`