mirror of https://github.com/Chocobozzz/PeerTube
Try to fix tests
parent
6aa5414813
commit
c1e5bd23d5
|
@ -4,8 +4,10 @@ import { body, param } from 'express-validator'
|
||||||
import { omit } from 'lodash'
|
import { omit } from 'lodash'
|
||||||
import { isIdOrUUIDValid, toBooleanOrNull, toIntOrNull } from '../../helpers/custom-validators/misc'
|
import { isIdOrUUIDValid, toBooleanOrNull, toIntOrNull } from '../../helpers/custom-validators/misc'
|
||||||
import {
|
import {
|
||||||
isNoInstanceConfigWarningModal, isNoWelcomeModal,
|
isNoInstanceConfigWarningModal,
|
||||||
|
isNoWelcomeModal,
|
||||||
isUserAdminFlagsValid,
|
isUserAdminFlagsValid,
|
||||||
|
isUserAutoPlayNextVideoValid,
|
||||||
isUserAutoPlayVideoValid,
|
isUserAutoPlayVideoValid,
|
||||||
isUserBlockedReasonValid,
|
isUserBlockedReasonValid,
|
||||||
isUserDescriptionValid,
|
isUserDescriptionValid,
|
||||||
|
@ -223,6 +225,9 @@ const usersUpdateMeValidator = [
|
||||||
body('noWelcomeModal')
|
body('noWelcomeModal')
|
||||||
.optional()
|
.optional()
|
||||||
.custom(v => isNoWelcomeModal(v)).withMessage('Should have a valid noWelcomeModal boolean'),
|
.custom(v => isNoWelcomeModal(v)).withMessage('Should have a valid noWelcomeModal boolean'),
|
||||||
|
body('autoPlayNextVideo')
|
||||||
|
.optional()
|
||||||
|
.custom(v => isUserAutoPlayNextVideoValid(v)).withMessage('Should have a valid autoPlayNextVideo boolean'),
|
||||||
|
|
||||||
async (req: express.Request, res: express.Response, next: express.NextFunction) => {
|
async (req: express.Request, res: express.Response, next: express.NextFunction) => {
|
||||||
logger.debug('Checking usersUpdateMe parameters', { parameters: omit(req.body, 'password') })
|
logger.debug('Checking usersUpdateMe parameters', { parameters: omit(req.body, 'password') })
|
||||||
|
|
|
@ -128,8 +128,12 @@ describe('Test application behind a reverse proxy', function () {
|
||||||
|
|
||||||
await wait(7000)
|
await wait(7000)
|
||||||
|
|
||||||
for (let i = 0; i < 50; i++) {
|
for (let i = 0; i < 100; i++) {
|
||||||
await getVideo(server.url, videoId)
|
try {
|
||||||
|
await getVideo(server.url, videoId)
|
||||||
|
} catch {
|
||||||
|
// don't care if it fails
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await getVideo(server.url, videoId, 429)
|
await getVideo(server.url, videoId, 429)
|
||||||
|
|
Loading…
Reference in New Issue