-/* tslint:disable:no-unused-expression */
+/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
import { omit } from 'lodash'
import 'mocha'
terms: 'my super terms',
codeOfConduct: 'my super coc',
+ creationReason: 'my super reason',
moderationInformation: 'my super moderation information',
administrator: 'Kuja',
maintenanceLifetime: 'forever',
businessModel: 'my super business model',
+ hardwareInformation: '2vCore 3GB RAM',
languages: [ 'en', 'es' ],
categories: [ 1, 2 ],
allowAudioFiles: true,
threads: 1,
resolutions: {
+ '0p': false,
'240p': false,
'360p': true,
'480p': true,
'1080p': false,
'2160p': false
},
+ webtorrent: {
+ enabled: true
+ },
hls: {
enabled: false
}
},
+ live: {
+ enabled: true,
+
+ allowReplay: false,
+ maxDuration: null,
+
+ transcoding: {
+ enabled: true,
+ threads: 4,
+ resolutions: {
+ '240p': true,
+ '360p': true,
+ '480p': true,
+ '720p': true,
+ '1080p': true,
+ '2160p': true
+ }
+ }
+ },
import: {
videos: {
http: {
indexUrl: 'https://index.example.com'
}
}
+ },
+ broadcastMessage: {
+ enabled: true,
+ dismissable: true,
+ message: 'super message',
+ level: 'warning'
+ },
+ search: {
+ remoteUri: {
+ users: true,
+ anonymous: true
+ },
+ searchIndex: {
+ enabled: true,
+ url: 'https://search.joinpeertube.org',
+ disableLocalSearch: true,
+ isDefaultSearch: true
+ }
}
}
})
})
+ it('Should fail with a disabled webtorrent & hls transcoding', async function () {
+ const newUpdateParams = immutableAssign(updateParams, {
+ transcoding: {
+ hls: {
+ enabled: false
+ },
+ webtorrent: {
+ enabled: false
+ }
+ }
+ })
+
+ await makePutBodyRequest({
+ url: server.url,
+ path,
+ fields: newUpdateParams,
+ token: server.accessToken,
+ statusCodeExpected: 400
+ })
+ })
+
it('Should success with the correct parameters', async function () {
await makePutBodyRequest({
url: server.url,