mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Add external login tests
This commit is contained in:
parent
4a8d113b9b
commit
9107d791e2
19 changed files with 582 additions and 27 deletions
|
@ -235,6 +235,27 @@ function getPluginTestPath (suffix = '') {
|
|||
return join(root(), 'server', 'tests', 'fixtures', 'peertube-plugin-test' + suffix)
|
||||
}
|
||||
|
||||
function getExternalAuth (options: {
|
||||
url: string
|
||||
npmName: string
|
||||
npmVersion: string
|
||||
authName: string
|
||||
query?: any
|
||||
statusCodeExpected?: number
|
||||
}) {
|
||||
const { url, npmName, npmVersion, authName, statusCodeExpected, query } = options
|
||||
|
||||
const path = '/plugins/' + npmName + '/' + npmVersion + '/auth/' + authName
|
||||
|
||||
return makeGetRequest({
|
||||
url,
|
||||
path,
|
||||
query,
|
||||
statusCodeExpected: statusCodeExpected || 200,
|
||||
redirects: 0
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
listPlugins,
|
||||
listAvailablePlugins,
|
||||
|
@ -250,5 +271,6 @@ export {
|
|||
updatePluginPackageJSON,
|
||||
getPluginPackageJSON,
|
||||
getPluginTestPath,
|
||||
getPublicSettings
|
||||
getPublicSettings,
|
||||
getExternalAuth
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue