Cleanup tests imports
This commit is contained in:
parent
e0faa8ad6e
commit
863477173e
|
@ -136,12 +136,6 @@ function toValueOrNull (value: string) {
|
||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
|
|
||||||
function toArray (value: any) {
|
|
||||||
if (value && isArray(value) === false) return [ value ]
|
|
||||||
|
|
||||||
return value
|
|
||||||
}
|
|
||||||
|
|
||||||
function toIntArray (value: any) {
|
function toIntArray (value: any) {
|
||||||
if (!value) return []
|
if (!value) return []
|
||||||
if (isArray(value) === false) return [ validator.toInt(value) ]
|
if (isArray(value) === false) return [ validator.toInt(value) ]
|
||||||
|
@ -170,7 +164,6 @@ export {
|
||||||
isBooleanValid,
|
isBooleanValid,
|
||||||
toIntOrNull,
|
toIntOrNull,
|
||||||
areUUIDsValid,
|
areUUIDsValid,
|
||||||
toArray,
|
|
||||||
toIntArray,
|
toIntArray,
|
||||||
isFileValid,
|
isFileValid,
|
||||||
checkMimetypeRegex
|
checkMimetypeRegex
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import express from 'express'
|
import express from 'express'
|
||||||
import { body, param, query } from 'express-validator'
|
import { body, param, query } from 'express-validator'
|
||||||
import { areValidActorHandles } from '@server/helpers/custom-validators/activitypub/actor'
|
import { areValidActorHandles } from '@server/helpers/custom-validators/activitypub/actor'
|
||||||
import { toArray } from '@server/helpers/custom-validators/misc'
|
|
||||||
import { getServerActor } from '@server/models/application/application'
|
import { getServerActor } from '@server/models/application/application'
|
||||||
|
import { arrayify } from '@shared/core-utils'
|
||||||
import { HttpStatusCode } from '../../../shared/models/http/http-error-codes'
|
import { HttpStatusCode } from '../../../shared/models/http/http-error-codes'
|
||||||
import { isEachUniqueHostValid, isHostValid } from '../../helpers/custom-validators/servers'
|
import { isEachUniqueHostValid, isHostValid } from '../../helpers/custom-validators/servers'
|
||||||
import { WEBSERVER } from '../../initializers/constants'
|
import { WEBSERVER } from '../../initializers/constants'
|
||||||
|
@ -121,12 +121,12 @@ const unblockServerByServerValidator = [
|
||||||
const blocklistStatusValidator = [
|
const blocklistStatusValidator = [
|
||||||
query('hosts')
|
query('hosts')
|
||||||
.optional()
|
.optional()
|
||||||
.customSanitizer(toArray)
|
.customSanitizer(arrayify)
|
||||||
.custom(isEachUniqueHostValid).withMessage('Should have a valid hosts array'),
|
.custom(isEachUniqueHostValid).withMessage('Should have a valid hosts array'),
|
||||||
|
|
||||||
query('accounts')
|
query('accounts')
|
||||||
.optional()
|
.optional()
|
||||||
.customSanitizer(toArray)
|
.customSanitizer(arrayify)
|
||||||
.custom(areValidActorHandles).withMessage('Should have a valid accounts array'),
|
.custom(areValidActorHandles).withMessage('Should have a valid accounts array'),
|
||||||
|
|
||||||
(req: express.Request, res: express.Response, next: express.NextFunction) => {
|
(req: express.Request, res: express.Response, next: express.NextFunction) => {
|
||||||
|
|
|
@ -3,6 +3,7 @@ import { body, query } from 'express-validator'
|
||||||
import { isUrlValid } from '@server/helpers/custom-validators/activitypub/misc'
|
import { isUrlValid } from '@server/helpers/custom-validators/activitypub/misc'
|
||||||
import { isStringArray } from '@server/helpers/custom-validators/search'
|
import { isStringArray } from '@server/helpers/custom-validators/search'
|
||||||
import { CONFIG } from '@server/initializers/config'
|
import { CONFIG } from '@server/initializers/config'
|
||||||
|
import { arrayify } from '@shared/core-utils'
|
||||||
import { HttpStatusCode } from '@shared/models'
|
import { HttpStatusCode } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
isValidClientLogLevel,
|
isValidClientLogLevel,
|
||||||
|
@ -12,7 +13,7 @@ import {
|
||||||
isValidClientLogUserAgent,
|
isValidClientLogUserAgent,
|
||||||
isValidLogLevel
|
isValidLogLevel
|
||||||
} from '../../helpers/custom-validators/logs'
|
} from '../../helpers/custom-validators/logs'
|
||||||
import { isDateValid, toArray } from '../../helpers/custom-validators/misc'
|
import { isDateValid } from '../../helpers/custom-validators/misc'
|
||||||
import { areValidationErrors } from './shared'
|
import { areValidationErrors } from './shared'
|
||||||
|
|
||||||
const createClientLogValidator = [
|
const createClientLogValidator = [
|
||||||
|
@ -56,7 +57,7 @@ const getLogsValidator = [
|
||||||
.custom(isValidLogLevel),
|
.custom(isValidLogLevel),
|
||||||
query('tagsOneOf')
|
query('tagsOneOf')
|
||||||
.optional()
|
.optional()
|
||||||
.customSanitizer(toArray)
|
.customSanitizer(arrayify)
|
||||||
.custom(isStringArray).withMessage('Should have a valid one of tags array'),
|
.custom(isStringArray).withMessage('Should have a valid one of tags array'),
|
||||||
query('endDate')
|
query('endDate')
|
||||||
.optional()
|
.optional()
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
import { arrayify } from '@shared/core-utils'
|
||||||
import express from 'express'
|
import express from 'express'
|
||||||
import { body, param, query } from 'express-validator'
|
import { body, param, query } from 'express-validator'
|
||||||
import { HttpStatusCode } from '../../../shared/models/http/http-error-codes'
|
import { HttpStatusCode } from '../../../shared/models/http/http-error-codes'
|
||||||
import { areValidActorHandles, isValidActorHandle } from '../../helpers/custom-validators/activitypub/actor'
|
import { areValidActorHandles, isValidActorHandle } from '../../helpers/custom-validators/activitypub/actor'
|
||||||
import { toArray } from '../../helpers/custom-validators/misc'
|
|
||||||
import { WEBSERVER } from '../../initializers/constants'
|
import { WEBSERVER } from '../../initializers/constants'
|
||||||
import { ActorFollowModel } from '../../models/actor/actor-follow'
|
import { ActorFollowModel } from '../../models/actor/actor-follow'
|
||||||
import { areValidationErrors } from './shared'
|
import { areValidationErrors } from './shared'
|
||||||
|
@ -32,7 +32,7 @@ const userSubscriptionAddValidator = [
|
||||||
|
|
||||||
const areSubscriptionsExistValidator = [
|
const areSubscriptionsExistValidator = [
|
||||||
query('uris')
|
query('uris')
|
||||||
.customSanitizer(toArray)
|
.customSanitizer(arrayify)
|
||||||
.custom(areValidActorHandles).withMessage('Should have a valid array of URIs'),
|
.custom(areValidActorHandles).withMessage('Should have a valid array of URIs'),
|
||||||
|
|
||||||
(req: express.Request, res: express.Response, next: express.NextFunction) => {
|
(req: express.Request, res: express.Response, next: express.NextFunction) => {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { Redis } from '@server/lib/redis'
|
||||||
import { getServerActor } from '@server/models/application/application'
|
import { getServerActor } from '@server/models/application/application'
|
||||||
import { ExpressPromiseHandler } from '@server/types/express-handler'
|
import { ExpressPromiseHandler } from '@server/types/express-handler'
|
||||||
import { MUserAccountId, MVideoFullLight } from '@server/types/models'
|
import { MUserAccountId, MVideoFullLight } from '@server/types/models'
|
||||||
import { getAllPrivacies } from '@shared/core-utils'
|
import { arrayify, getAllPrivacies } from '@shared/core-utils'
|
||||||
import { HttpStatusCode, ServerErrorCode, UserRight, VideoInclude } from '@shared/models'
|
import { HttpStatusCode, ServerErrorCode, UserRight, VideoInclude } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
exists,
|
exists,
|
||||||
|
@ -14,7 +14,6 @@ import {
|
||||||
isDateValid,
|
isDateValid,
|
||||||
isFileValid,
|
isFileValid,
|
||||||
isIdValid,
|
isIdValid,
|
||||||
toArray,
|
|
||||||
toBooleanOrNull,
|
toBooleanOrNull,
|
||||||
toIntOrNull,
|
toIntOrNull,
|
||||||
toValueOrNull
|
toValueOrNull
|
||||||
|
@ -419,27 +418,27 @@ function getCommonVideoEditAttributes () {
|
||||||
const commonVideosFiltersValidator = [
|
const commonVideosFiltersValidator = [
|
||||||
query('categoryOneOf')
|
query('categoryOneOf')
|
||||||
.optional()
|
.optional()
|
||||||
.customSanitizer(toArray)
|
.customSanitizer(arrayify)
|
||||||
.custom(isNumberArray).withMessage('Should have a valid categoryOneOf array'),
|
.custom(isNumberArray).withMessage('Should have a valid categoryOneOf array'),
|
||||||
query('licenceOneOf')
|
query('licenceOneOf')
|
||||||
.optional()
|
.optional()
|
||||||
.customSanitizer(toArray)
|
.customSanitizer(arrayify)
|
||||||
.custom(isNumberArray).withMessage('Should have a valid licenceOneOf array'),
|
.custom(isNumberArray).withMessage('Should have a valid licenceOneOf array'),
|
||||||
query('languageOneOf')
|
query('languageOneOf')
|
||||||
.optional()
|
.optional()
|
||||||
.customSanitizer(toArray)
|
.customSanitizer(arrayify)
|
||||||
.custom(isStringArray).withMessage('Should have a valid languageOneOf array'),
|
.custom(isStringArray).withMessage('Should have a valid languageOneOf array'),
|
||||||
query('privacyOneOf')
|
query('privacyOneOf')
|
||||||
.optional()
|
.optional()
|
||||||
.customSanitizer(toArray)
|
.customSanitizer(arrayify)
|
||||||
.custom(isNumberArray).withMessage('Should have a valid privacyOneOf array'),
|
.custom(isNumberArray).withMessage('Should have a valid privacyOneOf array'),
|
||||||
query('tagsOneOf')
|
query('tagsOneOf')
|
||||||
.optional()
|
.optional()
|
||||||
.customSanitizer(toArray)
|
.customSanitizer(arrayify)
|
||||||
.custom(isStringArray).withMessage('Should have a valid tagsOneOf array'),
|
.custom(isStringArray).withMessage('Should have a valid tagsOneOf array'),
|
||||||
query('tagsAllOf')
|
query('tagsAllOf')
|
||||||
.optional()
|
.optional()
|
||||||
.customSanitizer(toArray)
|
.customSanitizer(arrayify)
|
||||||
.custom(isStringArray).withMessage('Should have a valid tagsAllOf array'),
|
.custom(isStringArray).withMessage('Should have a valid tagsAllOf array'),
|
||||||
query('nsfw')
|
query('nsfw')
|
||||||
.optional()
|
.optional()
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import 'mocha'
|
import { expect } from 'chai'
|
||||||
import * as chai from 'chai'
|
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
import {
|
import {
|
||||||
cleanupTests,
|
cleanupTests,
|
||||||
|
@ -12,8 +11,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test AP cleaner', function () {
|
describe('Test AP cleaner', function () {
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
let videoUUID1: string
|
let videoUUID1: string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { processViewersStats } from '@server/tests/shared'
|
import { processViewersStats } from '@server/tests/shared'
|
||||||
import { HttpStatusCode, VideoPlaylistPrivacy, WatchActionObject } from '@shared/models'
|
import { HttpStatusCode, VideoPlaylistPrivacy, WatchActionObject } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
@ -13,8 +13,6 @@ import {
|
||||||
setDefaultVideoChannel
|
setDefaultVideoChannel
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test activitypub', function () {
|
describe('Test activitypub', function () {
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
let video: { id: number, uuid: string, shortUUID: string }
|
let video: { id: number, uuid: string, shortUUID: string }
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import 'mocha'
|
import { expect } from 'chai'
|
||||||
import * as chai from 'chai'
|
|
||||||
import {
|
import {
|
||||||
cleanupTests,
|
cleanupTests,
|
||||||
createMultipleServers,
|
createMultipleServers,
|
||||||
|
@ -11,8 +10,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test ActivityPub fetcher', function () {
|
describe('Test ActivityPub fetcher', function () {
|
||||||
let servers: PeerTubeServer[]
|
let servers: PeerTubeServer[]
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import 'mocha'
|
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models'
|
import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { buildDigest } from '@server/helpers/peertube-crypto'
|
import { buildDigest } from '@server/helpers/peertube-crypto'
|
||||||
import { HTTP_SIGNATURE } from '@server/initializers/constants'
|
import { HTTP_SIGNATURE } from '@server/initializers/constants'
|
||||||
import { activityPubContextify } from '@server/lib/activitypub/context'
|
import { activityPubContextify } from '@server/lib/activitypub/context'
|
||||||
|
@ -10,8 +10,6 @@ import { buildAbsoluteFixturePath, wait } from '@shared/core-utils'
|
||||||
import { HttpStatusCode } from '@shared/models'
|
import { HttpStatusCode } from '@shared/models'
|
||||||
import { cleanupTests, createMultipleServers, killallServers, PeerTubeServer } from '@shared/server-commands'
|
import { cleanupTests, createMultipleServers, killallServers, PeerTubeServer } from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
function setKeysOfServer (onServer: PeerTubeServer, ofServer: PeerTubeServer, publicKey: string, privateKey: string) {
|
function setKeysOfServer (onServer: PeerTubeServer, ofServer: PeerTubeServer, publicKey: string, privateKey: string) {
|
||||||
const url = 'http://localhost:' + ofServer.port + '/accounts/peertube'
|
const url = 'http://localhost:' + ofServer.port + '/accounts/peertube'
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import 'mocha'
|
|
||||||
import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@server/tests/shared'
|
import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@server/tests/shared'
|
||||||
import { AbuseCreate, AbuseState, HttpStatusCode } from '@shared/models'
|
import { AbuseCreate, AbuseState, HttpStatusCode } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import 'mocha'
|
|
||||||
import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@server/tests/shared'
|
import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@server/tests/shared'
|
||||||
import { HttpStatusCode } from '@shared/models'
|
import { HttpStatusCode } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import 'mocha'
|
|
||||||
import { FIXTURE_URLS } from '@server/tests/shared'
|
import { FIXTURE_URLS } from '@server/tests/shared'
|
||||||
import { areHttpImportTestsDisabled } from '@shared/core-utils'
|
import { areHttpImportTestsDisabled } from '@shared/core-utils'
|
||||||
import { HttpStatusCode } from '@shared/models'
|
import { HttpStatusCode } from '@shared/models'
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import 'mocha'
|
|
||||||
import { expect } from 'chai'
|
import { expect } from 'chai'
|
||||||
import { HttpStatusCode } from '@shared/models'
|
import { HttpStatusCode } from '@shared/models'
|
||||||
import { cleanupTests, createSingleServer, makeGetRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
|
import { cleanupTests, createSingleServer, makeGetRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import 'mocha'
|
|
||||||
import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@server/tests/shared'
|
import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@server/tests/shared'
|
||||||
import { HttpStatusCode, PeerTubePlugin, PluginType } from '@shared/models'
|
import { HttpStatusCode, PeerTubePlugin, PluginType } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import 'mocha'
|
|
||||||
import { expect } from 'chai'
|
import { expect } from 'chai'
|
||||||
import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@server/tests/shared'
|
import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@server/tests/shared'
|
||||||
import { HttpStatusCode, VideoBlacklistType } from '@shared/models'
|
import { HttpStatusCode, VideoBlacklistType } from '@shared/models'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@server/tests/shared'
|
import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@server/tests/shared'
|
||||||
import { HttpStatusCode, VideoCreateResult, VideoPrivacy } from '@shared/models'
|
import { HttpStatusCode, VideoCreateResult, VideoPrivacy } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
@ -13,8 +13,6 @@ import {
|
||||||
setAccessTokensToServers
|
setAccessTokensToServers
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test video comments API validator', function () {
|
describe('Test video comments API validator', function () {
|
||||||
let pathThread: string
|
let pathThread: string
|
||||||
let pathComment: string
|
let pathComment: string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
import { LiveVideoError, VideoPrivacy } from '@shared/models'
|
import { LiveVideoError, VideoPrivacy } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
@ -18,8 +18,6 @@ import {
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
import { checkLiveCleanup } from '../../shared'
|
import { checkLiveCleanup } from '../../shared'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test live constraints', function () {
|
describe('Test live constraints', function () {
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
let userId: number
|
let userId: number
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
import { HttpStatusCode, LiveVideoCreate, VideoPrivacy } from '@shared/models'
|
import { HttpStatusCode, LiveVideoCreate, VideoPrivacy } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
@ -14,8 +14,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Fast restream in live', function () {
|
describe('Fast restream in live', function () {
|
||||||
let server: PeerTubeServer
|
let server: PeerTubeServer
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
import { LiveVideoCreate, VideoPrivacy, VideoState } from '@shared/models'
|
import { LiveVideoCreate, VideoPrivacy, VideoState } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
@ -15,8 +15,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Permanent live', function () {
|
describe('Permanent live', function () {
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
let videoUUID: string
|
let videoUUID: string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { buildAbsoluteFixturePath } from '@shared/core-utils'
|
import { buildAbsoluteFixturePath } from '@shared/core-utils'
|
||||||
import { VideoPrivacy } from '@shared/models'
|
import { VideoPrivacy } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
@ -15,8 +15,6 @@ import {
|
||||||
waitUntilLivePublishedOnAllServers
|
waitUntilLivePublishedOnAllServers
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test live RTMPS', function () {
|
describe('Test live RTMPS', function () {
|
||||||
let server: PeerTubeServer
|
let server: PeerTubeServer
|
||||||
let rtmpUrl: string
|
let rtmpUrl: string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { FfmpegCommand } from 'fluent-ffmpeg'
|
import { FfmpegCommand } from 'fluent-ffmpeg'
|
||||||
import { checkLiveCleanup } from '@server/tests/shared'
|
import { checkLiveCleanup } from '@server/tests/shared'
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
|
@ -22,8 +22,6 @@ import {
|
||||||
waitUntilLiveWaitingOnAllServers
|
waitUntilLiveWaitingOnAllServers
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Save replay setting', function () {
|
describe('Save replay setting', function () {
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
let liveVideoUUID: string
|
let liveVideoUUID: string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
import { VideoPrivacy, VideoState } from '@shared/models'
|
import { VideoPrivacy, VideoState } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
@ -15,8 +15,6 @@ import {
|
||||||
waitUntilLivePublishedOnAllServers
|
waitUntilLivePublishedOnAllServers
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test live socket messages', function () {
|
describe('Test live socket messages', function () {
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { basename, join } from 'path'
|
import { basename, join } from 'path'
|
||||||
import { ffprobePromise, getVideoStream } from '@server/helpers/ffmpeg'
|
import { ffprobePromise, getVideoStream } from '@server/helpers/ffmpeg'
|
||||||
import { checkLiveSegmentHash, checkResolutionsInMasterPlaylist, getAllFiles, testImage } from '@server/tests/shared'
|
import { checkLiveSegmentHash, checkResolutionsInMasterPlaylist, getAllFiles, testImage } from '@server/tests/shared'
|
||||||
|
@ -32,8 +32,6 @@ import {
|
||||||
waitUntilLivePublishedOnAllServers
|
waitUntilLivePublishedOnAllServers
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test live', function () {
|
describe('Test live', function () {
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
let commands: LiveCommand[]
|
let commands: LiveCommand[]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { AbuseMessage, AbusePredefinedReasonsString, AbuseState, AdminAbuse, UserAbuse } from '@shared/models'
|
import { AbuseMessage, AbusePredefinedReasonsString, AbuseState, AdminAbuse, UserAbuse } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
AbusesCommand,
|
AbusesCommand,
|
||||||
|
@ -14,8 +14,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test abuses', function () {
|
describe('Test abuses', function () {
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
let abuseServer1: AdminAbuse
|
let abuseServer1: AdminAbuse
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { UserNotificationType } from '@shared/models'
|
import { UserNotificationType } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
cleanupTests,
|
cleanupTests,
|
||||||
|
@ -11,8 +11,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
async function checkNotifications (server: PeerTubeServer, token: string, expected: UserNotificationType[]) {
|
async function checkNotifications (server: PeerTubeServer, token: string, expected: UserNotificationType[]) {
|
||||||
const { data } = await server.notifications.list({ token, start: 0, count: 10, unread: true })
|
const { data } = await server.notifications.list({ token, start: 0, count: 10, unread: true })
|
||||||
expect(data).to.have.lengthOf(expected.length)
|
expect(data).to.have.lengthOf(expected.length)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { UserNotificationType } from '@shared/models'
|
import { UserNotificationType } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
BlocklistCommand,
|
BlocklistCommand,
|
||||||
|
@ -14,8 +14,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
async function checkAllVideos (server: PeerTubeServer, token: string) {
|
async function checkAllVideos (server: PeerTubeServer, token: string) {
|
||||||
{
|
{
|
||||||
const { data } = await server.videos.listWithToken({ token })
|
const { data } = await server.videos.listWithToken({ token })
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { FIXTURE_URLS } from '@server/tests/shared'
|
import { FIXTURE_URLS } from '@server/tests/shared'
|
||||||
import { sortObjectComparator } from '@shared/core-utils'
|
import { sortObjectComparator } from '@shared/core-utils'
|
||||||
import { UserAdminFlag, UserRole, VideoBlacklist, VideoBlacklistType } from '@shared/models'
|
import { UserAdminFlag, UserRole, VideoBlacklist, VideoBlacklistType } from '@shared/models'
|
||||||
|
@ -16,8 +16,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test video blacklist', function () {
|
describe('Test video blacklist', function () {
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
let videoId: number
|
let videoId: number
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import {
|
import {
|
||||||
checkCommentMention,
|
checkCommentMention,
|
||||||
CheckerBaseParams,
|
CheckerBaseParams,
|
||||||
|
@ -11,8 +11,6 @@ import {
|
||||||
import { UserNotification } from '@shared/models'
|
import { UserNotification } from '@shared/models'
|
||||||
import { cleanupTests, PeerTubeServer, waitJobs } from '@shared/server-commands'
|
import { cleanupTests, PeerTubeServer, waitJobs } from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test comments notifications', function () {
|
describe('Test comments notifications', function () {
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
let userToken: string
|
let userToken: string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import {
|
import {
|
||||||
CheckerBaseParams,
|
CheckerBaseParams,
|
||||||
checkNewVideoFromSubscription,
|
checkNewVideoFromSubscription,
|
||||||
|
@ -11,8 +11,6 @@ import {
|
||||||
import { UserNotification, UserNotificationSettingValue } from '@shared/models'
|
import { UserNotification, UserNotificationSettingValue } from '@shared/models'
|
||||||
import { cleanupTests, PeerTubeServer, waitJobs } from '@shared/server-commands'
|
import { cleanupTests, PeerTubeServer, waitJobs } from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test notifications API', function () {
|
describe('Test notifications API', function () {
|
||||||
let server: PeerTubeServer
|
let server: PeerTubeServer
|
||||||
let userNotifications: UserNotification[] = []
|
let userNotifications: UserNotification[] = []
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import {
|
import {
|
||||||
CheckerBaseParams,
|
CheckerBaseParams,
|
||||||
checkMyVideoImportIsFinished,
|
checkMyVideoImportIsFinished,
|
||||||
|
@ -18,8 +18,6 @@ import { buildUUID } from '@shared/extra-utils'
|
||||||
import { UserNotification, UserNotificationType, VideoPrivacy, VideoStudioTask } from '@shared/models'
|
import { UserNotification, UserNotificationType, VideoPrivacy, VideoStudioTask } from '@shared/models'
|
||||||
import { cleanupTests, findExternalSavedVideo, PeerTubeServer, stopFfmpeg, waitJobs } from '@shared/server-commands'
|
import { cleanupTests, findExternalSavedVideo, PeerTubeServer, stopFfmpeg, waitJobs } from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test user notifications', function () {
|
describe('Test user notifications', function () {
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
let userAccessToken: string
|
let userAccessToken: string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { expectStartWith } from '@server/tests/shared'
|
import { expectStartWith } from '@server/tests/shared'
|
||||||
import { areObjectStorageTestsDisabled } from '@shared/core-utils'
|
import { areObjectStorageTestsDisabled } from '@shared/core-utils'
|
||||||
import { HttpStatusCode, LiveVideoCreate, VideoFile, VideoPrivacy } from '@shared/models'
|
import { HttpStatusCode, LiveVideoCreate, VideoFile, VideoPrivacy } from '@shared/models'
|
||||||
|
@ -21,8 +21,6 @@ import {
|
||||||
waitUntilLiveWaitingOnAllServers
|
waitUntilLiveWaitingOnAllServers
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
async function createLive (server: PeerTubeServer, permanent: boolean) {
|
async function createLive (server: PeerTubeServer, permanent: boolean) {
|
||||||
const attributes: LiveVideoCreate = {
|
const attributes: LiveVideoCreate = {
|
||||||
channelId: server.store.channel.id,
|
channelId: server.store.channel.id,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { expectStartWith, FIXTURE_URLS } from '@server/tests/shared'
|
import { expectStartWith, FIXTURE_URLS } from '@server/tests/shared'
|
||||||
import { areObjectStorageTestsDisabled } from '@shared/core-utils'
|
import { areObjectStorageTestsDisabled } from '@shared/core-utils'
|
||||||
import { HttpStatusCode, VideoPrivacy } from '@shared/models'
|
import { HttpStatusCode, VideoPrivacy } from '@shared/models'
|
||||||
|
@ -15,8 +15,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
async function importVideo (server: PeerTubeServer) {
|
async function importVideo (server: PeerTubeServer) {
|
||||||
const attributes = {
|
const attributes = {
|
||||||
name: 'import 2',
|
name: 'import 2',
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import bytes from 'bytes'
|
import bytes from 'bytes'
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { stat } from 'fs-extra'
|
import { stat } from 'fs-extra'
|
||||||
import { merge } from 'lodash'
|
import { merge } from 'lodash'
|
||||||
import {
|
import {
|
||||||
|
@ -27,8 +27,6 @@ import {
|
||||||
webtorrentAdd
|
webtorrentAdd
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
async function checkFiles (options: {
|
async function checkFiles (options: {
|
||||||
video: VideoDetails
|
video: VideoDetails
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import {
|
import {
|
||||||
cleanupTests,
|
cleanupTests,
|
||||||
createMultipleServers,
|
createMultipleServers,
|
||||||
|
@ -12,8 +12,6 @@ import {
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
import { VideoPrivacy, VideoRedundanciesTarget } from '@shared/models'
|
import { VideoPrivacy, VideoRedundanciesTarget } from '@shared/models'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test manage videos redundancy', function () {
|
describe('Test manage videos redundancy', function () {
|
||||||
const targets: VideoRedundanciesTarget[] = [ 'my-videos', 'remote-videos' ]
|
const targets: VideoRedundanciesTarget[] = [ 'my-videos', 'remote-videos' ]
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { readdir } from 'fs-extra'
|
import { readdir } from 'fs-extra'
|
||||||
import magnetUtil from 'magnet-uri'
|
import magnetUtil from 'magnet-uri'
|
||||||
import { basename, join } from 'path'
|
import { basename, join } from 'path'
|
||||||
|
@ -25,8 +25,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
let video1Server2: VideoDetails
|
let video1Server2: VideoDetails
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
import { VideoChannel } from '@shared/models'
|
import { VideoChannel } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
@ -14,8 +14,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test ActivityPub video channels search', function () {
|
describe('Test ActivityPub video channels search', function () {
|
||||||
let servers: PeerTubeServer[]
|
let servers: PeerTubeServer[]
|
||||||
let userServer2Token: string
|
let userServer2Token: string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
import { VideoPlaylistPrivacy } from '@shared/models'
|
import { VideoPlaylistPrivacy } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
@ -14,8 +14,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test ActivityPub playlists search', function () {
|
describe('Test ActivityPub playlists search', function () {
|
||||||
let servers: PeerTubeServer[]
|
let servers: PeerTubeServer[]
|
||||||
let playlistServer1UUID: string
|
let playlistServer1UUID: string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
import { VideoPrivacy } from '@shared/models'
|
import { VideoPrivacy } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
@ -14,8 +14,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test ActivityPub videos search', function () {
|
describe('Test ActivityPub videos search', function () {
|
||||||
let servers: PeerTubeServer[]
|
let servers: PeerTubeServer[]
|
||||||
let videoServer1UUID: string
|
let videoServer1UUID: string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { VideoChannel } from '@shared/models'
|
import { VideoChannel } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
cleanupTests,
|
cleanupTests,
|
||||||
|
@ -13,8 +13,6 @@ import {
|
||||||
setDefaultChannelAvatar
|
setDefaultChannelAvatar
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test channels search', function () {
|
describe('Test channels search', function () {
|
||||||
let server: PeerTubeServer
|
let server: PeerTubeServer
|
||||||
let remoteServer: PeerTubeServer
|
let remoteServer: PeerTubeServer
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import {
|
import {
|
||||||
BooleanBothQuery,
|
BooleanBothQuery,
|
||||||
VideoChannelsSearchQuery,
|
VideoChannelsSearchQuery,
|
||||||
|
@ -11,8 +11,6 @@ import {
|
||||||
} from '@shared/models'
|
} from '@shared/models'
|
||||||
import { cleanupTests, createSingleServer, PeerTubeServer, SearchCommand, setAccessTokensToServers } from '@shared/server-commands'
|
import { cleanupTests, createSingleServer, PeerTubeServer, SearchCommand, setAccessTokensToServers } from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test index search', function () {
|
describe('Test index search', function () {
|
||||||
const localVideoName = 'local video' + new Date().toISOString()
|
const localVideoName = 'local video' + new Date().toISOString()
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { VideoPlaylistPrivacy } from '@shared/models'
|
import { VideoPlaylistPrivacy } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
cleanupTests,
|
cleanupTests,
|
||||||
|
@ -14,8 +14,6 @@ import {
|
||||||
setDefaultVideoChannel
|
setDefaultVideoChannel
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test playlists search', function () {
|
describe('Test playlists search', function () {
|
||||||
let server: PeerTubeServer
|
let server: PeerTubeServer
|
||||||
let remoteServer: PeerTubeServer
|
let remoteServer: PeerTubeServer
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
import { VideoPrivacy } from '@shared/models'
|
import { VideoPrivacy } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
@ -16,8 +16,6 @@ import {
|
||||||
stopFfmpeg
|
stopFfmpeg
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test videos search', function () {
|
describe('Test videos search', function () {
|
||||||
let server: PeerTubeServer
|
let server: PeerTubeServer
|
||||||
let remoteServer: PeerTubeServer
|
let remoteServer: PeerTubeServer
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { MockInstancesIndex } from '@server/tests/shared'
|
import { MockInstancesIndex } from '@server/tests/shared'
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
import { cleanupTests, createMultipleServers, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
|
import { cleanupTests, createMultipleServers, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
async function checkFollow (follower: PeerTubeServer, following: PeerTubeServer, exists: boolean) {
|
async function checkFollow (follower: PeerTubeServer, following: PeerTubeServer, exists: boolean) {
|
||||||
{
|
{
|
||||||
const body = await following.follows.getFollowers({ start: 0, count: 5, sort: '-createdAt' })
|
const body = await following.follows.getFollowers({ start: 0, count: 5, sort: '-createdAt' })
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import {
|
import {
|
||||||
BulkCommand,
|
BulkCommand,
|
||||||
cleanupTests,
|
cleanupTests,
|
||||||
|
@ -11,8 +11,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test bulk actions', function () {
|
describe('Test bulk actions', function () {
|
||||||
const commentsUser3: { videoId: number, commentId: number }[] = []
|
const commentsUser3: { videoId: number, commentId: number }[] = []
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { FIXTURE_URLS } from '@server/tests/shared'
|
import { FIXTURE_URLS } from '@server/tests/shared'
|
||||||
import { VideoDetails, VideoPrivacy } from '@shared/models'
|
import { VideoDetails, VideoPrivacy } from '@shared/models'
|
||||||
import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, setDefaultVideoChannel } from '@shared/server-commands'
|
import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, setDefaultVideoChannel } from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test config defaults', function () {
|
describe('Test config defaults', function () {
|
||||||
let server: PeerTubeServer
|
let server: PeerTubeServer
|
||||||
let channelId: number
|
let channelId: number
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { parallelTests } from '@shared/core-utils'
|
import { parallelTests } from '@shared/core-utils'
|
||||||
import { CustomConfig, HttpStatusCode } from '@shared/models'
|
import { CustomConfig, HttpStatusCode } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
@ -12,8 +12,6 @@ import {
|
||||||
setAccessTokensToServers
|
setAccessTokensToServers
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
function checkInitialConfig (server: PeerTubeServer, data: CustomConfig) {
|
function checkInitialConfig (server: PeerTubeServer, data: CustomConfig) {
|
||||||
expect(data.instance.name).to.equal('PeerTube')
|
expect(data.instance.name).to.equal('PeerTube')
|
||||||
expect(data.instance.shortDescription).to.equal(
|
expect(data.instance.shortDescription).to.equal(
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { MockSmtpServer } from '@server/tests/shared'
|
import { MockSmtpServer } from '@server/tests/shared'
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
import { HttpStatusCode } from '@shared/models'
|
import { HttpStatusCode } from '@shared/models'
|
||||||
|
@ -13,8 +13,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test contact form', function () {
|
describe('Test contact form', function () {
|
||||||
let server: PeerTubeServer
|
let server: PeerTubeServer
|
||||||
const emails: object[] = []
|
const emails: object[] = []
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { MockSmtpServer } from '@server/tests/shared'
|
import { MockSmtpServer } from '@server/tests/shared'
|
||||||
import { HttpStatusCode } from '@shared/models'
|
import { HttpStatusCode } from '@shared/models'
|
||||||
import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
|
import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test emails', function () {
|
describe('Test emails', function () {
|
||||||
let server: PeerTubeServer
|
let server: PeerTubeServer
|
||||||
let userId: number
|
let userId: number
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
|
import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
|
||||||
import { HttpStatusCode, PeerTubeProblemDocument, ServerErrorCode } from '@shared/models'
|
import { HttpStatusCode, PeerTubeProblemDocument, ServerErrorCode } from '@shared/models'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test follow constraints', function () {
|
describe('Test follow constraints', function () {
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
let video1UUID: string
|
let video1UUID: string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { expectStartWith } from '@server/tests/shared'
|
import { expectStartWith } from '@server/tests/shared'
|
||||||
import { ActorFollow, FollowState } from '@shared/models'
|
import { ActorFollow, FollowState } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
@ -12,8 +12,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
async function checkServer1And2HasFollowers (servers: PeerTubeServer[], state = 'accepted') {
|
async function checkServer1And2HasFollowers (servers: PeerTubeServer[], state = 'accepted') {
|
||||||
const fns = [
|
const fns = [
|
||||||
servers[0].follows.getFollowings.bind(servers[0].follows),
|
servers[0].follows.getFollowings.bind(servers[0].follows),
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { completeVideoCheck, dateIsValid, expectAccountFollows, expectChannelsFollows, testCaptionFile } from '@server/tests/shared'
|
import { completeVideoCheck, dateIsValid, expectAccountFollows, expectChannelsFollows, testCaptionFile } from '@server/tests/shared'
|
||||||
import { VideoCreateResult, VideoPrivacy } from '@shared/models'
|
import { VideoCreateResult, VideoPrivacy } from '@shared/models'
|
||||||
import { cleanupTests, createMultipleServers, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
|
import { cleanupTests, createMultipleServers, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test follows', function () {
|
describe('Test follows', function () {
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { completeVideoCheck } from '@server/tests/shared'
|
import { completeVideoCheck } from '@server/tests/shared'
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
import { HttpStatusCode, JobState, VideoCreateResult, VideoPrivacy } from '@shared/models'
|
import { HttpStatusCode, JobState, VideoCreateResult, VideoPrivacy } from '@shared/models'
|
||||||
|
@ -14,8 +14,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test handle downs', function () {
|
describe('Test handle downs', function () {
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
let threadIdServer1: number
|
let threadIdServer1: number
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { HttpStatusCode } from '@shared/models'
|
import { HttpStatusCode } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
cleanupTests,
|
cleanupTests,
|
||||||
|
@ -13,8 +13,6 @@ import {
|
||||||
setDefaultChannelAvatar
|
setDefaultChannelAvatar
|
||||||
} from '../../../../shared/server-commands/index'
|
} from '../../../../shared/server-commands/index'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
async function getHomepageState (server: PeerTubeServer) {
|
async function getHomepageState (server: PeerTubeServer) {
|
||||||
const config = await server.config.getConfig()
|
const config = await server.config.getConfig()
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { dateIsValid } from '@server/tests/shared'
|
import { dateIsValid } from '@server/tests/shared'
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
import {
|
import {
|
||||||
|
@ -12,8 +12,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test jobs', function () {
|
describe('Test jobs', function () {
|
||||||
let servers: PeerTubeServer[]
|
let servers: PeerTubeServer[]
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { HttpStatusCode } from '@shared/models'
|
import { HttpStatusCode } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
cleanupTests,
|
cleanupTests,
|
||||||
|
@ -12,8 +12,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test logs', function () {
|
describe('Test logs', function () {
|
||||||
let server: PeerTubeServer
|
let server: PeerTubeServer
|
||||||
let logsCommand: LogsCommand
|
let logsCommand: LogsCommand
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { pathExists, remove } from 'fs-extra'
|
import { pathExists, remove } from 'fs-extra'
|
||||||
import { join } from 'path'
|
import { join } from 'path'
|
||||||
import { testHelloWorldRegisteredSettings } from '@server/tests/shared'
|
import { testHelloWorldRegisteredSettings } from '@server/tests/shared'
|
||||||
|
@ -16,8 +16,6 @@ import {
|
||||||
setAccessTokensToServers
|
setAccessTokensToServers
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test plugins', function () {
|
describe('Test plugins', function () {
|
||||||
let server: PeerTubeServer = null
|
let server: PeerTubeServer = null
|
||||||
let command: PluginsCommand
|
let command: PluginsCommand
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { expectNotStartWith, expectStartWith, FIXTURE_URLS, MockProxy } from '@server/tests/shared'
|
import { expectNotStartWith, expectStartWith, FIXTURE_URLS, MockProxy } from '@server/tests/shared'
|
||||||
import { areObjectStorageTestsDisabled } from '@shared/core-utils'
|
import { areObjectStorageTestsDisabled } from '@shared/core-utils'
|
||||||
import { HttpStatusCode, VideoPrivacy } from '@shared/models'
|
import { HttpStatusCode, VideoPrivacy } from '@shared/models'
|
||||||
|
@ -15,8 +15,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test proxy', function () {
|
describe('Test proxy', function () {
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
let proxy: MockProxy
|
let proxy: MockProxy
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, setDefaultVideoChannel } from '@shared/server-commands'
|
import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, setDefaultVideoChannel } from '@shared/server-commands'
|
||||||
import { Video, VideoPlaylistPrivacy } from '@shared/models'
|
import { Video, VideoPlaylistPrivacy } from '@shared/models'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test services', function () {
|
describe('Test services', function () {
|
||||||
let server: PeerTubeServer = null
|
let server: PeerTubeServer = null
|
||||||
let playlistUUID: string
|
let playlistUUID: string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { Job } from '@shared/models'
|
import { Job } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
cleanupTests,
|
cleanupTests,
|
||||||
|
@ -11,8 +11,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test slow follows', function () {
|
describe('Test slow follows', function () {
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
import { ActivityType, VideoPlaylistPrivacy } from '@shared/models'
|
import { ActivityType, VideoPlaylistPrivacy } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
@ -14,8 +14,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test stats (excluding redundancy)', function () {
|
describe('Test stats (excluding redundancy)', function () {
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
let channelId
|
let channelId
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { getAudioStream, getVideoStreamDimensionsInfo } from '@server/helpers/ffmpeg'
|
import { getAudioStream, getVideoStreamDimensionsInfo } from '@server/helpers/ffmpeg'
|
||||||
import {
|
import {
|
||||||
cleanupTests,
|
cleanupTests,
|
||||||
|
@ -11,8 +11,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test audio only video transcoding', function () {
|
describe('Test audio only video transcoding', function () {
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
let videoUUID: string
|
let videoUUID: string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { checkResolutionsInMasterPlaylist, expectStartWith } from '@server/tests/shared'
|
import { checkResolutionsInMasterPlaylist, expectStartWith } from '@server/tests/shared'
|
||||||
import { areObjectStorageTestsDisabled } from '@shared/core-utils'
|
import { areObjectStorageTestsDisabled } from '@shared/core-utils'
|
||||||
import { HttpStatusCode, VideoDetails } from '@shared/models'
|
import { HttpStatusCode, VideoDetails } from '@shared/models'
|
||||||
|
@ -17,8 +17,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
async function checkFilesInObjectStorage (video: VideoDetails) {
|
async function checkFilesInObjectStorage (video: VideoDetails) {
|
||||||
for (const file of video.files) {
|
for (const file of video.files) {
|
||||||
expectStartWith(file.fileUrl, ObjectStorageCommand.getWebTorrentBaseUrl())
|
expectStartWith(file.fileUrl, ObjectStorageCommand.getWebTorrentBaseUrl())
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { basename, join } from 'path'
|
import { basename, join } from 'path'
|
||||||
import {
|
import {
|
||||||
checkDirectoryIsEmpty,
|
checkDirectoryIsEmpty,
|
||||||
|
@ -25,8 +25,6 @@ import {
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
import { DEFAULT_AUDIO_RESOLUTION } from '../../../initializers/constants'
|
import { DEFAULT_AUDIO_RESOLUTION } from '../../../initializers/constants'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
async function checkHlsPlaylist (options: {
|
async function checkHlsPlaylist (options: {
|
||||||
servers: PeerTubeServer[]
|
servers: PeerTubeServer[]
|
||||||
videoUUID: string
|
videoUUID: string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { VideoPrivacy } from '@shared/models'
|
import { VideoPrivacy } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
cleanupTests,
|
cleanupTests,
|
||||||
|
@ -14,8 +14,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test users subscriptions', function () {
|
describe('Test users subscriptions', function () {
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
const users: { accessToken: string }[] = []
|
const users: { accessToken: string }[] = []
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { HttpStatusCode } from '@shared/models'
|
import { HttpStatusCode } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
cleanupTests,
|
cleanupTests,
|
||||||
|
@ -12,8 +12,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test user videos', function () {
|
describe('Test user videos', function () {
|
||||||
let server: PeerTubeServer
|
let server: PeerTubeServer
|
||||||
let videoId: number
|
let videoId: number
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import {
|
import {
|
||||||
checkActorFilesWereRemoved,
|
checkActorFilesWereRemoved,
|
||||||
checkTmpIsEmpty,
|
checkTmpIsEmpty,
|
||||||
|
@ -19,8 +19,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test users with multiple servers', function () {
|
describe('Test users with multiple servers', function () {
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { MockSmtpServer } from '@server/tests/shared'
|
import { MockSmtpServer } from '@server/tests/shared'
|
||||||
import { HttpStatusCode } from '@shared/models'
|
import { HttpStatusCode } from '@shared/models'
|
||||||
import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
|
import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test users account verification', function () {
|
describe('Test users account verification', function () {
|
||||||
let server: PeerTubeServer
|
let server: PeerTubeServer
|
||||||
let userId: number
|
let userId: number
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { testImage } from '@server/tests/shared'
|
import { testImage } from '@server/tests/shared'
|
||||||
import { AbuseState, HttpStatusCode, OAuth2ErrorCode, UserAdminFlag, UserRole, VideoPlaylistType } from '@shared/models'
|
import { AbuseState, HttpStatusCode, OAuth2ErrorCode, UserAdminFlag, UserRole, VideoPlaylistType } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
@ -12,8 +12,6 @@ import {
|
||||||
setAccessTokensToServers
|
setAccessTokensToServers
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test users', function () {
|
describe('Test users', function () {
|
||||||
let server: PeerTubeServer
|
let server: PeerTubeServer
|
||||||
let token: string
|
let token: string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import request from 'supertest'
|
import request from 'supertest'
|
||||||
import {
|
import {
|
||||||
checkTmpIsEmpty,
|
checkTmpIsEmpty,
|
||||||
|
@ -25,8 +25,6 @@ import {
|
||||||
webtorrentAdd
|
webtorrentAdd
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test multiple servers', function () {
|
describe('Test multiple servers', function () {
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
const toRemove = []
|
const toRemove = []
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { pathExists, readdir, stat } from 'fs-extra'
|
import { pathExists, readdir, stat } from 'fs-extra'
|
||||||
import { join } from 'path'
|
import { join } from 'path'
|
||||||
import { buildAbsoluteFixturePath } from '@shared/core-utils'
|
import { buildAbsoluteFixturePath } from '@shared/core-utils'
|
||||||
|
@ -8,8 +8,6 @@ import { sha1 } from '@shared/extra-utils'
|
||||||
import { HttpStatusCode, VideoPrivacy } from '@shared/models'
|
import { HttpStatusCode, VideoPrivacy } from '@shared/models'
|
||||||
import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, setDefaultVideoChannel } from '@shared/server-commands'
|
import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, setDefaultVideoChannel } from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
// Most classic resumable upload tests are done in other test suites
|
// Most classic resumable upload tests are done in other test suites
|
||||||
|
|
||||||
describe('Test resumable upload', function () {
|
describe('Test resumable upload', function () {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { checkVideoFilesWereRemoved, completeVideoCheck, testImage } from '@server/tests/shared'
|
import { checkVideoFilesWereRemoved, completeVideoCheck, testImage } from '@server/tests/shared'
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
import { Video, VideoPrivacy } from '@shared/models'
|
import { Video, VideoPrivacy } from '@shared/models'
|
||||||
|
@ -14,8 +14,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test a single server', function () {
|
describe('Test a single server', function () {
|
||||||
|
|
||||||
function runSuite (mode: 'legacy' | 'resumable') {
|
function runSuite (mode: 'legacy' | 'resumable') {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { checkVideoFilesWereRemoved, testCaptionFile } from '@server/tests/shared'
|
import { checkVideoFilesWereRemoved, testCaptionFile } from '@server/tests/shared'
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
import {
|
import {
|
||||||
|
@ -12,8 +12,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test video captions', function () {
|
describe('Test video captions', function () {
|
||||||
const uuidRegex = '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'
|
const uuidRegex = '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import {
|
import {
|
||||||
ChangeOwnershipCommand,
|
ChangeOwnershipCommand,
|
||||||
cleanupTests,
|
cleanupTests,
|
||||||
|
@ -14,8 +14,6 @@ import {
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
import { HttpStatusCode, VideoPrivacy } from '@shared/models'
|
import { HttpStatusCode, VideoPrivacy } from '@shared/models'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test video change ownership - nominal', function () {
|
describe('Test video change ownership - nominal', function () {
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { basename } from 'path'
|
import { basename } from 'path'
|
||||||
import { ACTOR_IMAGES_SIZE } from '@server/initializers/constants'
|
import { ACTOR_IMAGES_SIZE } from '@server/initializers/constants'
|
||||||
import { testFileExistsOrNot, testImage } from '@server/tests/shared'
|
import { testFileExistsOrNot, testImage } from '@server/tests/shared'
|
||||||
|
@ -17,8 +17,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
async function findChannel (server: PeerTubeServer, channelId: number) {
|
async function findChannel (server: PeerTubeServer, channelId: number) {
|
||||||
const body = await server.channels.list({ sort: '-name' })
|
const body = await server.channels.list({ sort: '-name' })
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { dateIsValid, testImage } from '@server/tests/shared'
|
import { dateIsValid, testImage } from '@server/tests/shared'
|
||||||
import {
|
import {
|
||||||
cleanupTests,
|
cleanupTests,
|
||||||
|
@ -12,8 +12,6 @@ import {
|
||||||
setDefaultChannelAvatar
|
setDefaultChannelAvatar
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test video comments', function () {
|
describe('Test video comments', function () {
|
||||||
let server: PeerTubeServer
|
let server: PeerTubeServer
|
||||||
let videoId: number
|
let videoId: number
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import {
|
import {
|
||||||
cleanupTests,
|
cleanupTests,
|
||||||
createMultipleServers,
|
createMultipleServers,
|
||||||
|
@ -10,8 +10,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test video description', function () {
|
describe('Test video description', function () {
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
let videoUUID = ''
|
let videoUUID = ''
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
|
import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
|
||||||
import { BooleanBothQuery, CustomConfig, ResultList, Video, VideosOverview } from '@shared/models'
|
import { BooleanBothQuery, CustomConfig, ResultList, Video, VideosOverview } from '@shared/models'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
function createOverviewRes (overview: VideosOverview) {
|
function createOverviewRes (overview: VideosOverview) {
|
||||||
const videos = overview.categories[0].videos
|
const videos = overview.categories[0].videos
|
||||||
return { data: videos, total: videos.length }
|
return { data: videos, total: videos.length }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { testImage } from '@server/tests/shared'
|
import { testImage } from '@server/tests/shared'
|
||||||
import { VideoPlaylistPrivacy } from '@shared/models'
|
import { VideoPlaylistPrivacy } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
@ -13,8 +13,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Playlist thumbnail', function () {
|
describe('Playlist thumbnail', function () {
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { checkPlaylistFilesWereRemoved, testImage } from '@server/tests/shared'
|
import { checkPlaylistFilesWereRemoved, testImage } from '@server/tests/shared'
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
import {
|
import {
|
||||||
|
@ -24,8 +24,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
async function checkPlaylistElementType (
|
async function checkPlaylistElementType (
|
||||||
servers: PeerTubeServer[],
|
servers: PeerTubeServer[],
|
||||||
playlistId: string,
|
playlistId: string,
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
import { HttpStatusCode, VideoCreateResult, VideoPrivacy } from '@shared/models'
|
import { HttpStatusCode, VideoCreateResult, VideoPrivacy } from '@shared/models'
|
||||||
import { cleanupTests, createSingleServer, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
|
import { cleanupTests, createSingleServer, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test video privacy', function () {
|
describe('Test video privacy', function () {
|
||||||
const servers: PeerTubeServer[] = []
|
const servers: PeerTubeServer[] = []
|
||||||
let anotherUserToken: string
|
let anotherUserToken: string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
import { VideoPrivacy } from '@shared/models'
|
import { VideoPrivacy } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
@ -12,8 +12,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
function in10Seconds () {
|
function in10Seconds () {
|
||||||
const now = new Date()
|
const now = new Date()
|
||||||
now.setSeconds(now.getSeconds() + 10)
|
now.setSeconds(now.getSeconds() + 10)
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
|
import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test video source', () => {
|
describe('Test video source', () => {
|
||||||
let server: PeerTubeServer = null
|
let server: PeerTubeServer = null
|
||||||
const fixture = 'video_short.webm'
|
const fixture = 'video_short.webm'
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
import { Video } from '@shared/models'
|
import { Video } from '@shared/models'
|
||||||
import { cleanupTests, createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
|
import { cleanupTests, createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test videos history', function () {
|
describe('Test videos history', function () {
|
||||||
let server: PeerTubeServer = null
|
let server: PeerTubeServer = null
|
||||||
let video1Id: number
|
let video1Id: number
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
import { VideosOverview } from '@shared/models'
|
import { VideosOverview } from '@shared/models'
|
||||||
import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
|
import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test a videos overview', function () {
|
describe('Test a videos overview', function () {
|
||||||
let server: PeerTubeServer = null
|
let server: PeerTubeServer = null
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { FfmpegCommand } from 'fluent-ffmpeg'
|
import { FfmpegCommand } from 'fluent-ffmpeg'
|
||||||
import { prepareViewsServers, prepareViewsVideos, processViewsBuffer } from '@server/tests/shared'
|
import { prepareViewsServers, prepareViewsVideos, processViewsBuffer } from '@server/tests/shared'
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
import { cleanupTests, PeerTubeServer, stopFfmpeg, waitJobs } from '@shared/server-commands'
|
import { cleanupTests, PeerTubeServer, stopFfmpeg, waitJobs } from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test video views/viewers counters', function () {
|
describe('Test video views/viewers counters', function () {
|
||||||
let servers: PeerTubeServer[]
|
let servers: PeerTubeServer[]
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { FfmpegCommand } from 'fluent-ffmpeg'
|
import { FfmpegCommand } from 'fluent-ffmpeg'
|
||||||
import { prepareViewsServers, prepareViewsVideos, processViewersStats } from '@server/tests/shared'
|
import { prepareViewsServers, prepareViewsVideos, processViewersStats } from '@server/tests/shared'
|
||||||
import { cleanupTests, PeerTubeServer, stopFfmpeg, waitJobs } from '@shared/server-commands'
|
import { cleanupTests, PeerTubeServer, stopFfmpeg, waitJobs } from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test views overall stats', function () {
|
describe('Test views overall stats', function () {
|
||||||
let servers: PeerTubeServer[]
|
let servers: PeerTubeServer[]
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { prepareViewsServers, prepareViewsVideos, processViewersStats } from '@server/tests/shared'
|
import { prepareViewsServers, prepareViewsVideos, processViewersStats } from '@server/tests/shared'
|
||||||
import { cleanupTests, PeerTubeServer } from '@shared/server-commands'
|
import { cleanupTests, PeerTubeServer } from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test views retention stats', function () {
|
describe('Test views retention stats', function () {
|
||||||
let servers: PeerTubeServer[]
|
let servers: PeerTubeServer[]
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { FfmpegCommand } from 'fluent-ffmpeg'
|
import { FfmpegCommand } from 'fluent-ffmpeg'
|
||||||
import { prepareViewsServers, prepareViewsVideos, processViewersStats } from '@server/tests/shared'
|
import { prepareViewsServers, prepareViewsVideos, processViewersStats } from '@server/tests/shared'
|
||||||
import { VideoStatsTimeserie, VideoStatsTimeserieMetric } from '@shared/models'
|
import { VideoStatsTimeserie, VideoStatsTimeserieMetric } from '@shared/models'
|
||||||
import { cleanupTests, PeerTubeServer, stopFfmpeg } from '@shared/server-commands'
|
import { cleanupTests, PeerTubeServer, stopFfmpeg } from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
function buildOneMonthAgo () {
|
function buildOneMonthAgo () {
|
||||||
const monthAgo = new Date()
|
const monthAgo = new Date()
|
||||||
monthAgo.setHours(0, 0, 0, 0)
|
monthAgo.setHours(0, 0, 0, 0)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
import {
|
import {
|
||||||
cleanupTests,
|
cleanupTests,
|
||||||
|
@ -12,8 +12,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test video views cleaner', function () {
|
describe('Test video views cleaner', function () {
|
||||||
let servers: PeerTubeServer[]
|
let servers: PeerTubeServer[]
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { areObjectStorageTestsDisabled } from '@shared/core-utils'
|
import { areObjectStorageTestsDisabled } from '@shared/core-utils'
|
||||||
import { HttpStatusCode, VideoDetails, VideoFile, VideoInclude } from '@shared/models'
|
import { HttpStatusCode, VideoDetails, VideoFile, VideoInclude } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
@ -15,8 +15,6 @@ import {
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
import { expectStartWith } from '../shared'
|
import { expectStartWith } from '../shared'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
function assertVideoProperties (video: VideoFile, resolution: number, extname: string, size?: number) {
|
function assertVideoProperties (video: VideoFile, resolution: number, extname: string, size?: number) {
|
||||||
expect(video).to.have.nested.property('resolution.id', resolution)
|
expect(video).to.have.nested.property('resolution.id', resolution)
|
||||||
expect(video).to.have.property('torrentUrl').that.includes(`-${resolution}.torrent`)
|
expect(video).to.have.property('torrentUrl').that.includes(`-${resolution}.torrent`)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { areObjectStorageTestsDisabled } from '@shared/core-utils'
|
import { areObjectStorageTestsDisabled } from '@shared/core-utils'
|
||||||
import { HttpStatusCode, VideoFile } from '@shared/models'
|
import { HttpStatusCode, VideoFile } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
@ -15,8 +15,6 @@ import {
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
import { checkResolutionsInMasterPlaylist, expectStartWith } from '../shared'
|
import { checkResolutionsInMasterPlaylist, expectStartWith } from '../shared'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
async function checkFilesInObjectStorage (files: VideoFile[], type: 'webtorrent' | 'playlist') {
|
async function checkFilesInObjectStorage (files: VideoFile[], type: 'webtorrent' | 'playlist') {
|
||||||
for (const file of files) {
|
for (const file of files) {
|
||||||
const shouldStartWith = type === 'webtorrent'
|
const shouldStartWith = type === 'webtorrent'
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { buildAbsoluteFixturePath } from '@shared/core-utils'
|
import { buildAbsoluteFixturePath } from '@shared/core-utils'
|
||||||
import { CLICommand } from '@shared/server-commands'
|
import { CLICommand } from '@shared/server-commands'
|
||||||
import { VideoResolution } from '../../../shared/models/videos'
|
import { VideoResolution } from '../../../shared/models/videos'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test print transcode jobs', function () {
|
describe('Test print transcode jobs', function () {
|
||||||
|
|
||||||
it('Should print the correct command for each resolution', async function () {
|
it('Should print the correct command for each resolution', async function () {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { createFile, readdir } from 'fs-extra'
|
import { createFile, readdir } from 'fs-extra'
|
||||||
import { join } from 'path'
|
import { join } from 'path'
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
|
@ -19,8 +19,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
async function countFiles (server: PeerTubeServer, directory: string) {
|
async function countFiles (server: PeerTubeServer, directory: string) {
|
||||||
const files = await readdir(server.servers.buildDirectory(directory))
|
const files = await readdir(server.servers.buildDirectory(directory))
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { omit } from '@shared/core-utils'
|
import { omit } from '@shared/core-utils'
|
||||||
import {
|
import {
|
||||||
Account,
|
Account,
|
||||||
|
@ -23,8 +23,6 @@ import {
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '../../shared/server-commands'
|
} from '../../shared/server-commands'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
function checkIndexTags (html: string, title: string, description: string, css: string, config: ServerConfig) {
|
function checkIndexTags (html: string, title: string, description: string, css: string, config: ServerConfig) {
|
||||||
expect(html).to.contain('<title>' + title + '</title>')
|
expect(html).to.contain('<title>' + title + '</title>')
|
||||||
expect(html).to.contain('<meta name="description" content="' + description + '" />')
|
expect(html).to.contain('<meta name="description" content="' + description + '" />')
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { XMLParser, XMLValidator } from 'fast-xml-parser'
|
import { XMLParser, XMLValidator } from 'fast-xml-parser'
|
||||||
import { HttpStatusCode, VideoPrivacy } from '@shared/models'
|
import { HttpStatusCode, VideoPrivacy } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
@ -19,8 +19,6 @@ import {
|
||||||
chai.use(require('chai-xml'))
|
chai.use(require('chai-xml'))
|
||||||
chai.use(require('chai-json-schema'))
|
chai.use(require('chai-json-schema'))
|
||||||
chai.config.includeStack = true
|
chai.config.includeStack = true
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test syndication feeds', () => {
|
describe('Test syndication feeds', () => {
|
||||||
let servers: PeerTubeServer[] = []
|
let servers: PeerTubeServer[] = []
|
||||||
let serverHLSOnly: PeerTubeServer
|
let serverHLSOnly: PeerTubeServer
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { VideoCommentModel } from '../../models/video/video-comment'
|
import { VideoCommentModel } from '../../models/video/video-comment'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
class CommentMock {
|
class CommentMock {
|
||||||
text: string
|
text: string
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { snakeCase } from 'lodash'
|
import { snakeCase } from 'lodash'
|
||||||
import validator from 'validator'
|
import validator from 'validator'
|
||||||
import { getAverageBitrate, getMaxBitrate } from '@shared/core-utils'
|
import { getAverageBitrate, getMaxBitrate } from '@shared/core-utils'
|
||||||
import { VideoResolution } from '@shared/models'
|
import { VideoResolution } from '@shared/models'
|
||||||
import { objectConverter, parseBytes, parseDurationToMs } from '../../helpers/core-utils'
|
import { objectConverter, parseBytes, parseDurationToMs } from '../../helpers/core-utils'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Parse Bytes', function () {
|
describe('Parse Bytes', function () {
|
||||||
|
|
||||||
it('Should pass on valid value', async function () {
|
it('Should pass on valid value', async function () {
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { cleanupTests, createSingleServer, makeGetRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
|
import { cleanupTests, createSingleServer, makeGetRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
|
||||||
import { HttpStatusCode, VideoPrivacy } from '@shared/models'
|
import { HttpStatusCode, VideoPrivacy } from '@shared/models'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test misc endpoints', function () {
|
describe('Test misc endpoints', function () {
|
||||||
let server: PeerTubeServer
|
let server: PeerTubeServer
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import { expect } from 'chai'
|
||||||
import { HttpStatusCode, VideoDetails, VideoImportState, VideoPlaylist, VideoPlaylistPrivacy, VideoPrivacy } from '@shared/models'
|
import { HttpStatusCode, VideoDetails, VideoImportState, VideoPlaylist, VideoPlaylistPrivacy, VideoPrivacy } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
cleanupTests,
|
cleanupTests,
|
||||||
|
@ -15,8 +15,6 @@ import {
|
||||||
} from '@shared/server-commands'
|
} from '@shared/server-commands'
|
||||||
import { FIXTURE_URLS } from '../shared'
|
import { FIXTURE_URLS } from '../shared'
|
||||||
|
|
||||||
const expect = chai.expect
|
|
||||||
|
|
||||||
describe('Test plugin filter hooks', function () {
|
describe('Test plugin filter hooks', function () {
|
||||||
let servers: PeerTubeServer[]
|
let servers: PeerTubeServer[]
|
||||||
let videoUUID: string
|
let videoUUID: string
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user