Try to fix tests
This commit is contained in:
parent
6aa5414813
commit
c1e5bd23d5
|
@ -4,8 +4,10 @@ import { body, param } from 'express-validator'
|
|||
import { omit } from 'lodash'
|
||||
import { isIdOrUUIDValid, toBooleanOrNull, toIntOrNull } from '../../helpers/custom-validators/misc'
|
||||
import {
|
||||
isNoInstanceConfigWarningModal, isNoWelcomeModal,
|
||||
isNoInstanceConfigWarningModal,
|
||||
isNoWelcomeModal,
|
||||
isUserAdminFlagsValid,
|
||||
isUserAutoPlayNextVideoValid,
|
||||
isUserAutoPlayVideoValid,
|
||||
isUserBlockedReasonValid,
|
||||
isUserDescriptionValid,
|
||||
|
@ -223,6 +225,9 @@ const usersUpdateMeValidator = [
|
|||
body('noWelcomeModal')
|
||||
.optional()
|
||||
.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) => {
|
||||
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)
|
||||
|
||||
for (let i = 0; i < 50; i++) {
|
||||
await getVideo(server.url, videoId)
|
||||
for (let i = 0; i < 100; i++) {
|
||||
try {
|
||||
await getVideo(server.url, videoId)
|
||||
} catch {
|
||||
// don't care if it fails
|
||||
}
|
||||
}
|
||||
|
||||
await getVideo(server.url, videoId, 429)
|
||||
|
|
Loading…
Reference in New Issue