import * as chai from 'chai'
import * as request from 'supertest'
import {
- flushTests,
+ cleanupTests,
+ flushAndRunServer,
getCustomConfig,
getVideosList,
- killallServers,
makeHTMLRequest,
- runServer,
ServerInfo,
serverLogin,
updateCustomConfig,
updateCustomSubConfig,
uploadVideo
-} from './utils'
+} from '../../shared/extra-utils'
const expect = chai.expect
before(async function () {
this.timeout(120000)
- await flushTests()
-
- server = await runServer(1)
+ server = await flushAndRunServer(1)
server.accessToken = await serverLogin(server)
const videoAttributes = {
it('Should update the customized configuration and have the correct index html tags', async function () {
await updateCustomSubConfig(server.url, server.accessToken, {
instance: {
+ name: 'PeerTube updated',
+ shortDescription: 'my short description',
+ description: 'my super description',
+ terms: 'my super terms',
+ defaultClientRoute: '/videos/recently-added',
+ defaultNSFWPolicy: 'blur',
customizations: {
javascript: 'alert("coucou")',
css: 'body { background-color: red; }'
})
after(async function () {
- killallServers([ server ])
+ await cleanupTests([ server ])
})
})