Shared utils -> extra-utils
Because they need dev dependencies
This commit is contained in:
parent
4ee7a4c9ac
commit
94565d52bb
|
@ -11,7 +11,7 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
uploadVideo
|
uploadVideo
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ import {
|
||||||
uploadVideo,
|
uploadVideo,
|
||||||
userLogin,
|
userLogin,
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import * as chai from 'chai'
|
import * as chai from 'chai'
|
||||||
import { Video } from '../../../../shared/models/videos'
|
import { Video } from '../../../../shared/models/videos'
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import 'mocha'
|
import 'mocha'
|
||||||
import { expect } from 'chai'
|
import { expect } from 'chai'
|
||||||
import { buildRequestStub } from '../../../../shared/utils/miscs/stubs'
|
import { buildRequestStub } from '../../../../shared/extra-utils/miscs/stubs'
|
||||||
import { isHTTPSignatureVerified, isJsonLDSignatureVerified, parseHTTPSignature } from '../../../helpers/peertube-crypto'
|
import { isHTTPSignatureVerified, isJsonLDSignatureVerified, parseHTTPSignature } from '../../../helpers/peertube-crypto'
|
||||||
import { cloneDeep } from 'lodash'
|
import { cloneDeep } from 'lodash'
|
||||||
import { buildSignedActivity } from '../../../helpers/activitypub'
|
import { buildSignedActivity } from '../../../helpers/activitypub'
|
||||||
|
|
|
@ -20,8 +20,8 @@ import {
|
||||||
uploadVideoAndGetId,
|
uploadVideoAndGetId,
|
||||||
wait,
|
wait,
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { getAccount } from '../../../../shared/utils/users/accounts'
|
import { getAccount } from '../../../../shared/extra-utils/users/accounts'
|
||||||
import { VideoPlaylistPrivacy } from '../../../../shared/models/videos'
|
import { VideoPlaylistPrivacy } from '../../../../shared/models/videos'
|
||||||
|
|
||||||
describe('Test AP refresher', function () {
|
describe('Test AP refresher', function () {
|
||||||
|
|
|
@ -9,12 +9,12 @@ import {
|
||||||
killallServers,
|
killallServers,
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setActorField
|
setActorField
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { HTTP_SIGNATURE } from '../../../initializers/constants'
|
import { HTTP_SIGNATURE } from '../../../initializers/constants'
|
||||||
import { buildDigest, buildGlobalHeaders } from '../../../lib/job-queue/handlers/utils/activitypub-http-utils'
|
import { buildDigest, buildGlobalHeaders } from '../../../lib/job-queue/handlers/utils/activitypub-http-utils'
|
||||||
import * as chai from 'chai'
|
import * as chai from 'chai'
|
||||||
import { activityPubContextify, buildSignedActivity } from '../../../helpers/activitypub'
|
import { activityPubContextify, buildSignedActivity } from '../../../helpers/activitypub'
|
||||||
import { makeFollowRequest, makePOSTAPRequest } from '../../../../shared/utils/requests/activitypub'
|
import { makeFollowRequest, makePOSTAPRequest } from '../../../../shared/extra-utils/requests/activitypub'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
import 'mocha'
|
import 'mocha'
|
||||||
|
|
||||||
import { flushTests, killallServers, runServer, ServerInfo } from '../../../../shared/utils'
|
import { flushTests, killallServers, runServer, ServerInfo } from '../../../../shared/extra-utils'
|
||||||
import {
|
import {
|
||||||
checkBadCountPagination,
|
checkBadCountPagination,
|
||||||
checkBadSortPagination,
|
checkBadSortPagination,
|
||||||
checkBadStartPagination
|
checkBadStartPagination
|
||||||
} from '../../../../shared/utils/requests/check-api-params'
|
} from '../../../../shared/extra-utils/requests/check-api-params'
|
||||||
import { getAccount } from '../../../../shared/utils/users/accounts'
|
import { getAccount } from '../../../../shared/extra-utils/users/accounts'
|
||||||
|
|
||||||
describe('Test accounts API validators', function () {
|
describe('Test accounts API validators', function () {
|
||||||
const path = '/api/v1/accounts/'
|
const path = '/api/v1/accounts/'
|
||||||
|
|
|
@ -13,12 +13,12 @@ import {
|
||||||
makePostBodyRequest,
|
makePostBodyRequest,
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers, userLogin
|
setAccessTokensToServers, userLogin
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import {
|
import {
|
||||||
checkBadCountPagination,
|
checkBadCountPagination,
|
||||||
checkBadSortPagination,
|
checkBadSortPagination,
|
||||||
checkBadStartPagination
|
checkBadStartPagination
|
||||||
} from '../../../../shared/utils/requests/check-api-params'
|
} from '../../../../shared/extra-utils/requests/check-api-params'
|
||||||
|
|
||||||
describe('Test blocklist API validators', function () {
|
describe('Test blocklist API validators', function () {
|
||||||
let servers: ServerInfo[]
|
let servers: ServerInfo[]
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { CustomConfig } from '../../../../shared/models/server/custom-config.mod
|
||||||
import {
|
import {
|
||||||
createUser, flushTests, killallServers, makeDeleteRequest, makeGetRequest, makePutBodyRequest, runServer, ServerInfo,
|
createUser, flushTests, killallServers, makeDeleteRequest, makeGetRequest, makePutBodyRequest, runServer, ServerInfo,
|
||||||
setAccessTokensToServers, userLogin, immutableAssign
|
setAccessTokensToServers, userLogin, immutableAssign
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
|
|
||||||
describe('Test config API validators', function () {
|
describe('Test config API validators', function () {
|
||||||
const path = '/api/v1/config/custom'
|
const path = '/api/v1/config/custom'
|
||||||
|
|
|
@ -10,15 +10,15 @@ import {
|
||||||
runServer,
|
runServer,
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers
|
setAccessTokensToServers
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import {
|
import {
|
||||||
checkBadCountPagination,
|
checkBadCountPagination,
|
||||||
checkBadSortPagination,
|
checkBadSortPagination,
|
||||||
checkBadStartPagination
|
checkBadStartPagination
|
||||||
} from '../../../../shared/utils/requests/check-api-params'
|
} from '../../../../shared/extra-utils/requests/check-api-params'
|
||||||
import { getAccount } from '../../../../shared/utils/users/accounts'
|
import { getAccount } from '../../../../shared/extra-utils/users/accounts'
|
||||||
import { sendContactForm } from '../../../../shared/utils/server/contact-form'
|
import { sendContactForm } from '../../../../shared/extra-utils/server/contact-form'
|
||||||
import { MockSmtpServer } from '../../../../shared/utils/miscs/email'
|
import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email'
|
||||||
|
|
||||||
describe('Test contact form API validators', function () {
|
describe('Test contact form API validators', function () {
|
||||||
let server: ServerInfo
|
let server: ServerInfo
|
||||||
|
|
|
@ -10,8 +10,8 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
userLogin
|
userLogin
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { makeGetRequest } from '../../../../shared/utils/requests/requests'
|
import { makeGetRequest } from '../../../../shared/extra-utils/requests/requests'
|
||||||
|
|
||||||
describe('Test debug API validators', function () {
|
describe('Test debug API validators', function () {
|
||||||
const path = '/api/v1/server/debug'
|
const path = '/api/v1/server/debug'
|
||||||
|
|
|
@ -5,12 +5,12 @@ import 'mocha'
|
||||||
import {
|
import {
|
||||||
createUser, flushTests, killallServers, makeDeleteRequest, makePostBodyRequest, runServer, ServerInfo, setAccessTokensToServers,
|
createUser, flushTests, killallServers, makeDeleteRequest, makePostBodyRequest, runServer, ServerInfo, setAccessTokensToServers,
|
||||||
userLogin
|
userLogin
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import {
|
import {
|
||||||
checkBadCountPagination,
|
checkBadCountPagination,
|
||||||
checkBadSortPagination,
|
checkBadSortPagination,
|
||||||
checkBadStartPagination
|
checkBadStartPagination
|
||||||
} from '../../../../shared/utils/requests/check-api-params'
|
} from '../../../../shared/extra-utils/requests/check-api-params'
|
||||||
|
|
||||||
describe('Test server follows API validators', function () {
|
describe('Test server follows API validators', function () {
|
||||||
let server: ServerInfo
|
let server: ServerInfo
|
||||||
|
|
|
@ -10,13 +10,13 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
userLogin
|
userLogin
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import {
|
import {
|
||||||
checkBadCountPagination,
|
checkBadCountPagination,
|
||||||
checkBadSortPagination,
|
checkBadSortPagination,
|
||||||
checkBadStartPagination
|
checkBadStartPagination
|
||||||
} from '../../../../shared/utils/requests/check-api-params'
|
} from '../../../../shared/extra-utils/requests/check-api-params'
|
||||||
import { makeGetRequest } from '../../../../shared/utils/requests/requests'
|
import { makeGetRequest } from '../../../../shared/extra-utils/requests/requests'
|
||||||
|
|
||||||
describe('Test jobs API validators', function () {
|
describe('Test jobs API validators', function () {
|
||||||
const path = '/api/v1/jobs/failed'
|
const path = '/api/v1/jobs/failed'
|
||||||
|
|
|
@ -10,8 +10,8 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
userLogin
|
userLogin
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { makeGetRequest } from '../../../../shared/utils/requests/requests'
|
import { makeGetRequest } from '../../../../shared/extra-utils/requests/requests'
|
||||||
|
|
||||||
describe('Test logs API validators', function () {
|
describe('Test logs API validators', function () {
|
||||||
const path = '/api/v1/server/logs'
|
const path = '/api/v1/server/logs'
|
||||||
|
|
|
@ -12,7 +12,7 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
userLogin
|
userLogin
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
|
|
||||||
describe('Test server redundancy API validators', function () {
|
describe('Test server redundancy API validators', function () {
|
||||||
let servers: ServerInfo[]
|
let servers: ServerInfo[]
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
import 'mocha'
|
import 'mocha'
|
||||||
|
|
||||||
import { flushTests, immutableAssign, killallServers, makeGetRequest, runServer, ServerInfo } from '../../../../shared/utils'
|
import { flushTests, immutableAssign, killallServers, makeGetRequest, runServer, ServerInfo } from '../../../../shared/extra-utils'
|
||||||
import {
|
import {
|
||||||
checkBadCountPagination,
|
checkBadCountPagination,
|
||||||
checkBadSortPagination,
|
checkBadSortPagination,
|
||||||
checkBadStartPagination
|
checkBadStartPagination
|
||||||
} from '../../../../shared/utils/requests/check-api-params'
|
} from '../../../../shared/extra-utils/requests/check-api-params'
|
||||||
|
|
||||||
describe('Test videos API validator', function () {
|
describe('Test videos API validator', function () {
|
||||||
let server: ServerInfo
|
let server: ServerInfo
|
||||||
|
|
|
@ -10,7 +10,7 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
uploadVideo
|
uploadVideo
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
|
|
||||||
describe('Test services API validators', function () {
|
describe('Test services API validators', function () {
|
||||||
let server: ServerInfo
|
let server: ServerInfo
|
||||||
|
|
|
@ -14,12 +14,12 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
wait
|
wait
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import {
|
import {
|
||||||
checkBadCountPagination,
|
checkBadCountPagination,
|
||||||
checkBadSortPagination,
|
checkBadSortPagination,
|
||||||
checkBadStartPagination
|
checkBadStartPagination
|
||||||
} from '../../../../shared/utils/requests/check-api-params'
|
} from '../../../../shared/extra-utils/requests/check-api-params'
|
||||||
import { UserNotificationSetting, UserNotificationSettingValue } from '../../../../shared/models/users'
|
import { UserNotificationSetting, UserNotificationSettingValue } from '../../../../shared/models/users'
|
||||||
|
|
||||||
describe('Test user notifications API validators', function () {
|
describe('Test user notifications API validators', function () {
|
||||||
|
|
|
@ -13,14 +13,14 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
userLogin
|
userLogin
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
checkBadCountPagination,
|
checkBadCountPagination,
|
||||||
checkBadSortPagination,
|
checkBadSortPagination,
|
||||||
checkBadStartPagination
|
checkBadStartPagination
|
||||||
} from '../../../../shared/utils/requests/check-api-params'
|
} from '../../../../shared/extra-utils/requests/check-api-params'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
|
|
||||||
describe('Test user subscriptions API validators', function () {
|
describe('Test user subscriptions API validators', function () {
|
||||||
const path = '/api/v1/users/me/subscriptions'
|
const path = '/api/v1/users/me/subscriptions'
|
||||||
|
|
|
@ -9,15 +9,15 @@ import {
|
||||||
createUser, flushTests, getMyUserInformation, getMyUserVideoRating, getUsersList, immutableAssign, killallServers, makeGetRequest,
|
createUser, flushTests, getMyUserInformation, getMyUserVideoRating, getUsersList, immutableAssign, killallServers, makeGetRequest,
|
||||||
makePostBodyRequest, makeUploadRequest, makePutBodyRequest, registerUser, removeUser, runServer, ServerInfo, setAccessTokensToServers,
|
makePostBodyRequest, makeUploadRequest, makePutBodyRequest, registerUser, removeUser, runServer, ServerInfo, setAccessTokensToServers,
|
||||||
updateUser, uploadVideo, userLogin, deleteMe, unblockUser, blockUser
|
updateUser, uploadVideo, userLogin, deleteMe, unblockUser, blockUser
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import {
|
import {
|
||||||
checkBadCountPagination,
|
checkBadCountPagination,
|
||||||
checkBadSortPagination,
|
checkBadSortPagination,
|
||||||
checkBadStartPagination
|
checkBadStartPagination
|
||||||
} from '../../../../shared/utils/requests/check-api-params'
|
} from '../../../../shared/extra-utils/requests/check-api-params'
|
||||||
import { getMagnetURI, getMyVideoImports, getYoutubeVideoUrl, importVideo } from '../../../../shared/utils/videos/video-imports'
|
import { getMagnetURI, getMyVideoImports, getYoutubeVideoUrl, importVideo } from '../../../../shared/extra-utils/videos/video-imports'
|
||||||
import { VideoPrivacy } from '../../../../shared/models/videos'
|
import { VideoPrivacy } from '../../../../shared/models/videos'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
import { expect } from 'chai'
|
import { expect } from 'chai'
|
||||||
import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model'
|
import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model'
|
||||||
|
|
||||||
|
|
|
@ -15,12 +15,12 @@ import {
|
||||||
updateVideoAbuse,
|
updateVideoAbuse,
|
||||||
uploadVideo,
|
uploadVideo,
|
||||||
userLogin
|
userLogin
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import {
|
import {
|
||||||
checkBadCountPagination,
|
checkBadCountPagination,
|
||||||
checkBadSortPagination,
|
checkBadSortPagination,
|
||||||
checkBadStartPagination
|
checkBadStartPagination
|
||||||
} from '../../../../shared/utils/requests/check-api-params'
|
} from '../../../../shared/extra-utils/requests/check-api-params'
|
||||||
import { VideoAbuseState } from '../../../../shared/models/videos'
|
import { VideoAbuseState } from '../../../../shared/models/videos'
|
||||||
|
|
||||||
describe('Test video abuses API validators', function () {
|
describe('Test video abuses API validators', function () {
|
||||||
|
|
|
@ -18,12 +18,12 @@ import {
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
uploadVideo,
|
uploadVideo,
|
||||||
userLogin, waitJobs
|
userLogin, waitJobs
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import {
|
import {
|
||||||
checkBadCountPagination,
|
checkBadCountPagination,
|
||||||
checkBadSortPagination,
|
checkBadSortPagination,
|
||||||
checkBadStartPagination
|
checkBadStartPagination
|
||||||
} from '../../../../shared/utils/requests/check-api-params'
|
} from '../../../../shared/extra-utils/requests/check-api-params'
|
||||||
import { VideoDetails, VideoBlacklistType } from '../../../../shared/models/videos'
|
import { VideoDetails, VideoBlacklistType } from '../../../../shared/models/videos'
|
||||||
import { expect } from 'chai'
|
import { expect } from 'chai'
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,9 @@ import {
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
uploadVideo,
|
uploadVideo,
|
||||||
userLogin
|
userLogin
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { join } from 'path'
|
import { join } from 'path'
|
||||||
import { createVideoCaption } from '../../../../shared/utils/videos/video-captions'
|
import { createVideoCaption } from '../../../../shared/extra-utils/videos/video-captions'
|
||||||
|
|
||||||
describe('Test video captions API validator', function () {
|
describe('Test video captions API validator', function () {
|
||||||
const path = '/api/v1/videos/'
|
const path = '/api/v1/videos/'
|
||||||
|
|
|
@ -20,12 +20,12 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
userLogin
|
userLogin
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import {
|
import {
|
||||||
checkBadCountPagination,
|
checkBadCountPagination,
|
||||||
checkBadSortPagination,
|
checkBadSortPagination,
|
||||||
checkBadStartPagination
|
checkBadStartPagination
|
||||||
} from '../../../../shared/utils/requests/check-api-params'
|
} from '../../../../shared/extra-utils/requests/check-api-params'
|
||||||
import { User } from '../../../../shared/models/users'
|
import { User } from '../../../../shared/models/users'
|
||||||
import { join } from 'path'
|
import { join } from 'path'
|
||||||
|
|
||||||
|
|
|
@ -6,13 +6,13 @@ import {
|
||||||
createUser,
|
createUser,
|
||||||
flushTests, killallServers, makeDeleteRequest, makeGetRequest, makePostBodyRequest, runServer, ServerInfo, setAccessTokensToServers,
|
flushTests, killallServers, makeDeleteRequest, makeGetRequest, makePostBodyRequest, runServer, ServerInfo, setAccessTokensToServers,
|
||||||
uploadVideo, userLogin
|
uploadVideo, userLogin
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import {
|
import {
|
||||||
checkBadCountPagination,
|
checkBadCountPagination,
|
||||||
checkBadSortPagination,
|
checkBadSortPagination,
|
||||||
checkBadStartPagination
|
checkBadStartPagination
|
||||||
} from '../../../../shared/utils/requests/check-api-params'
|
} from '../../../../shared/extra-utils/requests/check-api-params'
|
||||||
import { addVideoCommentThread } from '../../../../shared/utils/videos/video-comments'
|
import { addVideoCommentThread } from '../../../../shared/extra-utils/videos/video-comments'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -18,13 +18,13 @@ import {
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
updateCustomSubConfig,
|
updateCustomSubConfig,
|
||||||
userLogin
|
userLogin
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import {
|
import {
|
||||||
checkBadCountPagination,
|
checkBadCountPagination,
|
||||||
checkBadSortPagination,
|
checkBadSortPagination,
|
||||||
checkBadStartPagination
|
checkBadStartPagination
|
||||||
} from '../../../../shared/utils/requests/check-api-params'
|
} from '../../../../shared/extra-utils/requests/check-api-params'
|
||||||
import { getMagnetURI, getYoutubeVideoUrl } from '../../../../shared/utils/videos/video-imports'
|
import { getMagnetURI, getYoutubeVideoUrl } from '../../../../shared/extra-utils/videos/video-imports'
|
||||||
|
|
||||||
describe('Test video imports API validator', function () {
|
describe('Test video imports API validator', function () {
|
||||||
const path = '/api/v1/videos/imports'
|
const path = '/api/v1/videos/imports'
|
||||||
|
|
|
@ -20,12 +20,12 @@ import {
|
||||||
updateVideoPlaylist,
|
updateVideoPlaylist,
|
||||||
updateVideoPlaylistElement,
|
updateVideoPlaylistElement,
|
||||||
uploadVideoAndGetId
|
uploadVideoAndGetId
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import {
|
import {
|
||||||
checkBadCountPagination,
|
checkBadCountPagination,
|
||||||
checkBadSortPagination,
|
checkBadSortPagination,
|
||||||
checkBadStartPagination
|
checkBadStartPagination
|
||||||
} from '../../../../shared/utils/requests/check-api-params'
|
} from '../../../../shared/extra-utils/requests/check-api-params'
|
||||||
import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model'
|
import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model'
|
||||||
import { VideoPlaylistType } from '../../../../shared/models/videos/playlist/video-playlist-type.model'
|
import { VideoPlaylistType } from '../../../../shared/models/videos/playlist/video-playlist-type.model'
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers, setDefaultVideoChannel,
|
setAccessTokensToServers, setDefaultVideoChannel,
|
||||||
userLogin
|
userLogin
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { UserRole } from '../../../../shared/models/users'
|
import { UserRole } from '../../../../shared/models/users'
|
||||||
import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model'
|
import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model'
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
uploadVideo
|
uploadVideo
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -9,13 +9,13 @@ import {
|
||||||
createUser, flushTests, getMyUserInformation, getVideo, getVideosList, immutableAssign, killallServers, makeDeleteRequest,
|
createUser, flushTests, getMyUserInformation, getVideo, getVideosList, immutableAssign, killallServers, makeDeleteRequest,
|
||||||
makeGetRequest, makeUploadRequest, makePutBodyRequest, removeVideo, uploadVideo,
|
makeGetRequest, makeUploadRequest, makePutBodyRequest, removeVideo, uploadVideo,
|
||||||
runServer, ServerInfo, setAccessTokensToServers, userLogin, updateCustomSubConfig
|
runServer, ServerInfo, setAccessTokensToServers, userLogin, updateCustomSubConfig
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import {
|
import {
|
||||||
checkBadCountPagination,
|
checkBadCountPagination,
|
||||||
checkBadSortPagination,
|
checkBadSortPagination,
|
||||||
checkBadStartPagination
|
checkBadStartPagination
|
||||||
} from '../../../../shared/utils/requests/check-api-params'
|
} from '../../../../shared/extra-utils/requests/check-api-params'
|
||||||
import { getAccountsList } from '../../../../shared/utils/users/accounts'
|
import { getAccountsList } from '../../../../shared/extra-utils/users/accounts'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -20,11 +20,11 @@ import {
|
||||||
wait,
|
wait,
|
||||||
getCustomConfig,
|
getCustomConfig,
|
||||||
updateCustomConfig, getVideoThreadComments, getVideoCommentThreads, follow
|
updateCustomConfig, getVideoThreadComments, getVideoCommentThreads, follow
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { killallServers, ServerInfo, uploadVideo } from '../../../../shared/utils/index'
|
import { killallServers, ServerInfo, uploadVideo } from '../../../../shared/extra-utils/index'
|
||||||
import { setAccessTokensToServers } from '../../../../shared/utils/users/login'
|
import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
import { getUserNotificationSocket } from '../../../../shared/utils/socket/socket-io'
|
import { getUserNotificationSocket } from '../../../../shared/extra-utils/socket/socket-io'
|
||||||
import {
|
import {
|
||||||
checkCommentMention,
|
checkCommentMention,
|
||||||
CheckerBaseParams,
|
CheckerBaseParams,
|
||||||
|
@ -42,7 +42,7 @@ import {
|
||||||
markAsReadNotifications,
|
markAsReadNotifications,
|
||||||
updateMyNotificationSettings,
|
updateMyNotificationSettings,
|
||||||
markAsReadAllNotifications, checkNewInstanceFollower
|
markAsReadAllNotifications, checkNewInstanceFollower
|
||||||
} from '../../../../shared/utils/users/user-notifications'
|
} from '../../../../shared/extra-utils/users/user-notifications'
|
||||||
import {
|
import {
|
||||||
User,
|
User,
|
||||||
UserNotification,
|
UserNotification,
|
||||||
|
@ -50,13 +50,13 @@ import {
|
||||||
UserNotificationSettingValue,
|
UserNotificationSettingValue,
|
||||||
UserNotificationType
|
UserNotificationType
|
||||||
} from '../../../../shared/models/users'
|
} from '../../../../shared/models/users'
|
||||||
import { MockSmtpServer } from '../../../../shared/utils/miscs/email'
|
import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email'
|
||||||
import { addUserSubscription, removeUserSubscription } from '../../../../shared/utils/users/user-subscriptions'
|
import { addUserSubscription, removeUserSubscription } from '../../../../shared/extra-utils/users/user-subscriptions'
|
||||||
import { VideoPrivacy } from '../../../../shared/models/videos'
|
import { VideoPrivacy } from '../../../../shared/models/videos'
|
||||||
import { getBadVideoUrl, getYoutubeVideoUrl, importVideo } from '../../../../shared/utils/videos/video-imports'
|
import { getBadVideoUrl, getYoutubeVideoUrl, importVideo } from '../../../../shared/extra-utils/videos/video-imports'
|
||||||
import { addVideoCommentReply, addVideoCommentThread } from '../../../../shared/utils/videos/video-comments'
|
import { addVideoCommentReply, addVideoCommentThread } from '../../../../shared/extra-utils/videos/video-comments'
|
||||||
import * as uuidv4 from 'uuid/v4'
|
import * as uuidv4 from 'uuid/v4'
|
||||||
import { addAccountToAccountBlocklist, removeAccountFromAccountBlocklist } from '../../../../shared/utils/users/blocklist'
|
import { addAccountToAccountBlocklist, removeAccountFromAccountBlocklist } from '../../../../shared/extra-utils/users/blocklist'
|
||||||
import { CustomConfig } from '../../../../shared/models/server'
|
import { CustomConfig } from '../../../../shared/models/server'
|
||||||
import { VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model'
|
import { VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model'
|
||||||
|
|
||||||
|
|
|
@ -24,16 +24,16 @@ import {
|
||||||
viewVideo,
|
viewVideo,
|
||||||
wait,
|
wait,
|
||||||
waitUntilLog
|
waitUntilLog
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
|
|
||||||
import * as magnetUtil from 'magnet-uri'
|
import * as magnetUtil from 'magnet-uri'
|
||||||
import { updateRedundancy } from '../../../../shared/utils/server/redundancy'
|
import { updateRedundancy } from '../../../../shared/extra-utils/server/redundancy'
|
||||||
import { ActorFollow } from '../../../../shared/models/actors'
|
import { ActorFollow } from '../../../../shared/models/actors'
|
||||||
import { readdir } from 'fs-extra'
|
import { readdir } from 'fs-extra'
|
||||||
import { join } from 'path'
|
import { join } from 'path'
|
||||||
import { VideoRedundancyStrategy } from '../../../../shared/models/redundancy'
|
import { VideoRedundancyStrategy } from '../../../../shared/models/redundancy'
|
||||||
import { getStats } from '../../../../shared/utils/server/stats'
|
import { getStats } from '../../../../shared/extra-utils/server/stats'
|
||||||
import { ServerStats } from '../../../../shared/models/server/server-stats.model'
|
import { ServerStats } from '../../../../shared/models/server/server-stats.model'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
|
@ -17,10 +17,10 @@ import {
|
||||||
uploadVideo,
|
uploadVideo,
|
||||||
userLogin,
|
userLogin,
|
||||||
wait
|
wait
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
import { VideoChannel } from '../../../../shared/models/videos'
|
import { VideoChannel } from '../../../../shared/models/videos'
|
||||||
import { searchVideoChannel } from '../../../../shared/utils/search/video-channels'
|
import { searchVideoChannel } from '../../../../shared/extra-utils/search/video-channels'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@ import {
|
||||||
uploadVideo,
|
uploadVideo,
|
||||||
wait,
|
wait,
|
||||||
searchVideo
|
searchVideo
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
import { Video, VideoPrivacy } from '../../../../shared/models/videos'
|
import { Video, VideoPrivacy } from '../../../../shared/models/videos'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
|
@ -13,7 +13,7 @@ import {
|
||||||
uploadVideo,
|
uploadVideo,
|
||||||
wait,
|
wait,
|
||||||
immutableAssign
|
immutableAssign
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ import {
|
||||||
runServer,
|
runServer,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
updateCustomConfig
|
updateCustomConfig
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { ServerConfig } from '../../../../shared/models'
|
import { ServerConfig } from '../../../../shared/models'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import * as chai from 'chai'
|
||||||
import 'mocha'
|
import 'mocha'
|
||||||
import { flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers, wait } from '../../../../shared/utils'
|
import { flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers, wait } from '../../../../shared/extra-utils'
|
||||||
import { MockSmtpServer } from '../../../../shared/utils/miscs/email'
|
import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
import { sendContactForm } from '../../../../shared/utils/server/contact-form'
|
import { sendContactForm } from '../../../../shared/extra-utils/server/contact-form'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,9 @@ import {
|
||||||
killallServers,
|
killallServers,
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers
|
setAccessTokensToServers
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { MockSmtpServer } from '../../../../shared/utils/miscs/email'
|
import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -13,10 +13,10 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
uploadVideo
|
uploadVideo
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { unfollow } from '../../../../shared/utils/server/follows'
|
import { unfollow } from '../../../../shared/extra-utils/server/follows'
|
||||||
import { userLogin } from '../../../../shared/utils/users/login'
|
import { userLogin } from '../../../../shared/extra-utils/users/login'
|
||||||
import { createUser } from '../../../../shared/utils/users/users'
|
import { createUser } from '../../../../shared/extra-utils/users/users'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -9,15 +9,15 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
updateCustomSubConfig
|
updateCustomSubConfig
|
||||||
} from '../../../../shared/utils/index'
|
} from '../../../../shared/extra-utils/index'
|
||||||
import {
|
import {
|
||||||
follow,
|
follow,
|
||||||
getFollowersListPaginationAndSort,
|
getFollowersListPaginationAndSort,
|
||||||
getFollowingListPaginationAndSort,
|
getFollowingListPaginationAndSort,
|
||||||
removeFollower,
|
removeFollower,
|
||||||
rejectFollower
|
rejectFollower
|
||||||
} from '../../../../shared/utils/server/follows'
|
} from '../../../../shared/extra-utils/server/follows'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
import { ActorFollow } from '../../../../shared/models/actors'
|
import { ActorFollow } from '../../../../shared/models/actors'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
|
@ -4,7 +4,7 @@ import * as chai from 'chai'
|
||||||
import 'mocha'
|
import 'mocha'
|
||||||
import { Video, VideoPrivacy } from '../../../../shared/models/videos'
|
import { Video, VideoPrivacy } from '../../../../shared/models/videos'
|
||||||
import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model'
|
import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model'
|
||||||
import { completeVideoCheck } from '../../../../shared/utils'
|
import { completeVideoCheck } from '../../../../shared/extra-utils'
|
||||||
import {
|
import {
|
||||||
flushAndRunMultipleServers,
|
flushAndRunMultipleServers,
|
||||||
getVideosList,
|
getVideosList,
|
||||||
|
@ -12,26 +12,26 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
uploadVideo
|
uploadVideo
|
||||||
} from '../../../../shared/utils/index'
|
} from '../../../../shared/extra-utils/index'
|
||||||
import { dateIsValid } from '../../../../shared/utils/miscs/miscs'
|
import { dateIsValid } from '../../../../shared/extra-utils/miscs/miscs'
|
||||||
import {
|
import {
|
||||||
follow,
|
follow,
|
||||||
getFollowersListPaginationAndSort,
|
getFollowersListPaginationAndSort,
|
||||||
getFollowingListPaginationAndSort,
|
getFollowingListPaginationAndSort,
|
||||||
unfollow
|
unfollow
|
||||||
} from '../../../../shared/utils/server/follows'
|
} from '../../../../shared/extra-utils/server/follows'
|
||||||
import { expectAccountFollows } from '../../../../shared/utils/users/accounts'
|
import { expectAccountFollows } from '../../../../shared/extra-utils/users/accounts'
|
||||||
import { userLogin } from '../../../../shared/utils/users/login'
|
import { userLogin } from '../../../../shared/extra-utils/users/login'
|
||||||
import { createUser } from '../../../../shared/utils/users/users'
|
import { createUser } from '../../../../shared/extra-utils/users/users'
|
||||||
import {
|
import {
|
||||||
addVideoCommentReply,
|
addVideoCommentReply,
|
||||||
addVideoCommentThread,
|
addVideoCommentThread,
|
||||||
getVideoCommentThreads,
|
getVideoCommentThreads,
|
||||||
getVideoThreadComments
|
getVideoThreadComments
|
||||||
} from '../../../../shared/utils/videos/video-comments'
|
} from '../../../../shared/extra-utils/videos/video-comments'
|
||||||
import { rateVideo } from '../../../../shared/utils/videos/videos'
|
import { rateVideo } from '../../../../shared/extra-utils/videos/videos'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
import { createVideoCaption, listVideoCaptions, testCaptionFile } from '../../../../shared/utils/videos/video-captions'
|
import { createVideoCaption, listVideoCaptions, testCaptionFile } from '../../../../shared/extra-utils/videos/video-captions'
|
||||||
import { VideoCaption } from '../../../../shared/models/videos/caption/video-caption.model'
|
import { VideoCaption } from '../../../../shared/models/videos/caption/video-caption.model'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
|
@ -20,15 +20,15 @@ import {
|
||||||
updateVideo,
|
updateVideo,
|
||||||
uploadVideo,
|
uploadVideo,
|
||||||
wait
|
wait
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { follow, getFollowersListPaginationAndSort } from '../../../../shared/utils/server/follows'
|
import { follow, getFollowersListPaginationAndSort } from '../../../../shared/extra-utils/server/follows'
|
||||||
import { getJobsListPaginationAndSort, waitJobs } from '../../../../shared/utils/server/jobs'
|
import { getJobsListPaginationAndSort, waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
import {
|
import {
|
||||||
addVideoCommentReply,
|
addVideoCommentReply,
|
||||||
addVideoCommentThread,
|
addVideoCommentThread,
|
||||||
getVideoCommentThreads,
|
getVideoCommentThreads,
|
||||||
getVideoThreadComments
|
getVideoThreadComments
|
||||||
} from '../../../../shared/utils/videos/video-comments'
|
} from '../../../../shared/extra-utils/videos/video-comments'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import * as chai from 'chai'
|
||||||
import 'mocha'
|
import 'mocha'
|
||||||
import { killallServers, ServerInfo, setAccessTokensToServers } from '../../../../shared/utils/index'
|
import { killallServers, ServerInfo, setAccessTokensToServers } from '../../../../shared/extra-utils/index'
|
||||||
import { doubleFollow } from '../../../../shared/utils/server/follows'
|
import { doubleFollow } from '../../../../shared/extra-utils/server/follows'
|
||||||
import { getJobsList, getJobsListPaginationAndSort, waitJobs } from '../../../../shared/utils/server/jobs'
|
import { getJobsList, getJobsListPaginationAndSort, waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
import { flushAndRunMultipleServers } from '../../../../shared/utils/server/servers'
|
import { flushAndRunMultipleServers } from '../../../../shared/extra-utils/server/servers'
|
||||||
import { uploadVideo } from '../../../../shared/utils/videos/videos'
|
import { uploadVideo } from '../../../../shared/extra-utils/videos/videos'
|
||||||
import { dateIsValid } from '../../../../shared/utils/miscs/miscs'
|
import { dateIsValid } from '../../../../shared/extra-utils/miscs/miscs'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import * as chai from 'chai'
|
||||||
import 'mocha'
|
import 'mocha'
|
||||||
import { flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers } from '../../../../shared/utils/index'
|
import { flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers } from '../../../../shared/extra-utils/index'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
import { uploadVideo } from '../../../../shared/utils/videos/videos'
|
import { uploadVideo } from '../../../../shared/extra-utils/videos/videos'
|
||||||
import { getLogs } from '../../../../shared/utils/logs/logs'
|
import { getLogs } from '../../../../shared/extra-utils/logs/logs'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,8 @@ import {
|
||||||
flushTests,
|
flushTests,
|
||||||
killallServers,
|
killallServers,
|
||||||
ServerInfo
|
ServerInfo
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { runServer } from '../../../../shared/utils/server/servers'
|
import { runServer } from '../../../../shared/extra-utils/server/servers'
|
||||||
|
|
||||||
describe('Start and stop server without web client routes', function () {
|
describe('Start and stop server without web client routes', function () {
|
||||||
let server: ServerInfo
|
let server: ServerInfo
|
||||||
|
|
|
@ -15,7 +15,7 @@ import {
|
||||||
userLogin,
|
userLogin,
|
||||||
viewVideo,
|
viewVideo,
|
||||||
wait
|
wait
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
@ -23,7 +23,7 @@ import {
|
||||||
flushTests,
|
flushTests,
|
||||||
runServer,
|
runServer,
|
||||||
registerUser, getCustomConfig, setAccessTokensToServers, updateCustomConfig
|
registerUser, getCustomConfig, setAccessTokensToServers, updateCustomConfig
|
||||||
} from '../../../../shared/utils/index'
|
} from '../../../../shared/extra-utils/index'
|
||||||
|
|
||||||
describe('Test application behind a reverse proxy', function () {
|
describe('Test application behind a reverse proxy', function () {
|
||||||
let server = null
|
let server = null
|
||||||
|
|
|
@ -13,11 +13,11 @@ import {
|
||||||
uploadVideo,
|
uploadVideo,
|
||||||
viewVideo,
|
viewVideo,
|
||||||
wait
|
wait
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { flushTests, setAccessTokensToServers } from '../../../../shared/utils/index'
|
import { flushTests, setAccessTokensToServers } from '../../../../shared/extra-utils/index'
|
||||||
import { getStats } from '../../../../shared/utils/server/stats'
|
import { getStats } from '../../../../shared/extra-utils/server/stats'
|
||||||
import { addVideoCommentThread } from '../../../../shared/utils/videos/video-comments'
|
import { addVideoCommentThread } from '../../../../shared/extra-utils/videos/video-comments'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
import * as magnetUtil from 'magnet-uri'
|
import * as magnetUtil from 'magnet-uri'
|
||||||
import 'mocha'
|
import 'mocha'
|
||||||
import { getVideo, killallServers, reRunServer, runServer, ServerInfo, uploadVideo } from '../../../../shared/utils'
|
import { getVideo, killallServers, reRunServer, runServer, ServerInfo, uploadVideo } from '../../../../shared/extra-utils'
|
||||||
import { flushTests, setAccessTokensToServers } from '../../../../shared/utils/index'
|
import { flushTests, setAccessTokensToServers } from '../../../../shared/extra-utils/index'
|
||||||
import { VideoDetails } from '../../../../shared/models/videos'
|
import { VideoDetails } from '../../../../shared/models/videos'
|
||||||
import * as WebTorrent from 'webtorrent'
|
import * as WebTorrent from 'webtorrent'
|
||||||
|
|
||||||
|
|
|
@ -12,16 +12,16 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
uploadVideo,
|
uploadVideo,
|
||||||
userLogin
|
userLogin
|
||||||
} from '../../../../shared/utils/index'
|
} from '../../../../shared/extra-utils/index'
|
||||||
import { setAccessTokensToServers } from '../../../../shared/utils/users/login'
|
import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login'
|
||||||
import { getVideosListWithToken, getVideosList } from '../../../../shared/utils/videos/videos'
|
import { getVideosListWithToken, getVideosList } from '../../../../shared/extra-utils/videos/videos'
|
||||||
import {
|
import {
|
||||||
addVideoCommentReply,
|
addVideoCommentReply,
|
||||||
addVideoCommentThread,
|
addVideoCommentThread,
|
||||||
getVideoCommentThreads,
|
getVideoCommentThreads,
|
||||||
getVideoThreadComments
|
getVideoThreadComments
|
||||||
} from '../../../../shared/utils/videos/video-comments'
|
} from '../../../../shared/extra-utils/videos/video-comments'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model'
|
import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model'
|
||||||
import {
|
import {
|
||||||
addAccountToAccountBlocklist,
|
addAccountToAccountBlocklist,
|
||||||
|
@ -36,7 +36,7 @@ import {
|
||||||
removeAccountFromServerBlocklist,
|
removeAccountFromServerBlocklist,
|
||||||
removeServerFromAccountBlocklist,
|
removeServerFromAccountBlocklist,
|
||||||
removeServerFromServerBlocklist
|
removeServerFromServerBlocklist
|
||||||
} from '../../../../shared/utils/users/blocklist'
|
} from '../../../../shared/extra-utils/users/blocklist'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -11,18 +11,18 @@ import {
|
||||||
unfollow,
|
unfollow,
|
||||||
updateVideo,
|
updateVideo,
|
||||||
userLogin
|
userLogin
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { killallServers, ServerInfo, uploadVideo } from '../../../../shared/utils/index'
|
import { killallServers, ServerInfo, uploadVideo } from '../../../../shared/extra-utils/index'
|
||||||
import { setAccessTokensToServers } from '../../../../shared/utils/users/login'
|
import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login'
|
||||||
import { Video, VideoChannel } from '../../../../shared/models/videos'
|
import { Video, VideoChannel } from '../../../../shared/models/videos'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
import {
|
import {
|
||||||
addUserSubscription,
|
addUserSubscription,
|
||||||
listUserSubscriptions,
|
listUserSubscriptions,
|
||||||
listUserSubscriptionVideos,
|
listUserSubscriptionVideos,
|
||||||
removeUserSubscription,
|
removeUserSubscription,
|
||||||
getUserSubscription, areSubscriptionsExist
|
getUserSubscription, areSubscriptionsExist
|
||||||
} from '../../../../shared/utils/users/user-subscriptions'
|
} from '../../../../shared/extra-utils/users/user-subscriptions'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -14,13 +14,20 @@ import {
|
||||||
removeUser,
|
removeUser,
|
||||||
updateMyUser,
|
updateMyUser,
|
||||||
userLogin
|
userLogin
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { getMyUserInformation, killallServers, ServerInfo, testImage, updateMyAvatar, uploadVideo } from '../../../../shared/utils/index'
|
import {
|
||||||
import { checkActorFilesWereRemoved, getAccount, getAccountsList } from '../../../../shared/utils/users/accounts'
|
getMyUserInformation,
|
||||||
import { setAccessTokensToServers } from '../../../../shared/utils/users/login'
|
killallServers,
|
||||||
|
ServerInfo,
|
||||||
|
testImage,
|
||||||
|
updateMyAvatar,
|
||||||
|
uploadVideo
|
||||||
|
} from '../../../../shared/extra-utils/index'
|
||||||
|
import { checkActorFilesWereRemoved, getAccount, getAccountsList } from '../../../../shared/extra-utils/users/accounts'
|
||||||
|
import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login'
|
||||||
import { User } from '../../../../shared/models/users'
|
import { User } from '../../../../shared/models/users'
|
||||||
import { VideoChannel } from '../../../../shared/models/videos'
|
import { VideoChannel } from '../../../../shared/models/videos'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,10 @@ import 'mocha'
|
||||||
import {
|
import {
|
||||||
registerUser, flushTests, getUserInformation, getMyUserInformation, killallServers,
|
registerUser, flushTests, getUserInformation, getMyUserInformation, killallServers,
|
||||||
userLogin, login, runServer, ServerInfo, verifyEmail, updateCustomSubConfig, wait
|
userLogin, login, runServer, ServerInfo, verifyEmail, updateCustomSubConfig, wait
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { setAccessTokensToServers } from '../../../../shared/utils/users/login'
|
import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login'
|
||||||
import { MockSmtpServer } from '../../../../shared/utils/miscs/email'
|
import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -33,10 +33,10 @@ import {
|
||||||
updateUser,
|
updateUser,
|
||||||
uploadVideo,
|
uploadVideo,
|
||||||
userLogin
|
userLogin
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { follow } from '../../../../shared/utils/server/follows'
|
import { follow } from '../../../../shared/extra-utils/server/follows'
|
||||||
import { setAccessTokensToServers } from '../../../../shared/utils/users/login'
|
import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login'
|
||||||
import { getMyVideos } from '../../../../shared/utils/videos/videos'
|
import { getMyVideos } from '../../../../shared/extra-utils/videos/videos'
|
||||||
import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model'
|
import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
|
@ -32,15 +32,15 @@ import {
|
||||||
viewVideo,
|
viewVideo,
|
||||||
wait,
|
wait,
|
||||||
webtorrentAdd
|
webtorrentAdd
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import {
|
import {
|
||||||
addVideoCommentReply,
|
addVideoCommentReply,
|
||||||
addVideoCommentThread,
|
addVideoCommentThread,
|
||||||
deleteVideoComment,
|
deleteVideoComment,
|
||||||
getVideoCommentThreads,
|
getVideoCommentThreads,
|
||||||
getVideoThreadComments
|
getVideoThreadComments
|
||||||
} from '../../../../shared/utils/videos/video-comments'
|
} from '../../../../shared/extra-utils/videos/video-comments'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
uploadVideo
|
uploadVideo
|
||||||
} from '../../../../shared/utils/index'
|
} from '../../../../shared/extra-utils/index'
|
||||||
import { runServer } from '../../../../shared/utils/server/servers'
|
import { runServer } from '../../../../shared/extra-utils/server/servers'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ import {
|
||||||
uploadVideo,
|
uploadVideo,
|
||||||
viewVideo,
|
viewVideo,
|
||||||
wait
|
wait
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@ import {
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
updateVideoAbuse,
|
updateVideoAbuse,
|
||||||
uploadVideo
|
uploadVideo
|
||||||
} from '../../../../shared/utils/index'
|
} from '../../../../shared/extra-utils/index'
|
||||||
import { doubleFollow } from '../../../../shared/utils/server/follows'
|
import { doubleFollow } from '../../../../shared/extra-utils/server/follows'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -20,9 +20,9 @@ import {
|
||||||
updateVideoBlacklist,
|
updateVideoBlacklist,
|
||||||
uploadVideo,
|
uploadVideo,
|
||||||
userLogin
|
userLogin
|
||||||
} from '../../../../shared/utils/index'
|
} from '../../../../shared/extra-utils/index'
|
||||||
import { doubleFollow } from '../../../../shared/utils/server/follows'
|
import { doubleFollow } from '../../../../shared/extra-utils/server/follows'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
import { VideoBlacklist, VideoBlacklistType } from '../../../../shared/models/videos'
|
import { VideoBlacklist, VideoBlacklistType } from '../../../../shared/models/videos'
|
||||||
import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model'
|
import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model'
|
||||||
import { UserRole } from '../../../../shared/models/users'
|
import { UserRole } from '../../../../shared/models/users'
|
||||||
|
|
|
@ -9,10 +9,15 @@ import {
|
||||||
removeVideo,
|
removeVideo,
|
||||||
uploadVideo,
|
uploadVideo,
|
||||||
wait
|
wait
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { flushTests, killallServers, ServerInfo, setAccessTokensToServers } from '../../../../shared/utils/index'
|
import { flushTests, killallServers, ServerInfo, setAccessTokensToServers } from '../../../../shared/extra-utils/index'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
import { createVideoCaption, deleteVideoCaption, listVideoCaptions, testCaptionFile } from '../../../../shared/utils/videos/video-captions'
|
import {
|
||||||
|
createVideoCaption,
|
||||||
|
deleteVideoCaption,
|
||||||
|
listVideoCaptions,
|
||||||
|
testCaptionFile
|
||||||
|
} from '../../../../shared/extra-utils/videos/video-captions'
|
||||||
import { VideoCaption } from '../../../../shared/models/videos/caption/video-caption.model'
|
import { VideoCaption } from '../../../../shared/models/videos/caption/video-caption.model'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
|
@ -18,8 +18,8 @@ import {
|
||||||
uploadVideo,
|
uploadVideo,
|
||||||
userLogin,
|
userLogin,
|
||||||
getVideo
|
getVideo
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
import { User } from '../../../../shared/models/users'
|
import { User } from '../../../../shared/models/users'
|
||||||
import { VideoDetails } from '../../../../shared/models/videos'
|
import { VideoDetails } from '../../../../shared/models/videos'
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ import {
|
||||||
updateVideoChannelAvatar,
|
updateVideoChannelAvatar,
|
||||||
uploadVideo,
|
uploadVideo,
|
||||||
userLogin
|
userLogin
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import {
|
import {
|
||||||
addVideoChannel,
|
addVideoChannel,
|
||||||
deleteVideoChannel,
|
deleteVideoChannel,
|
||||||
|
@ -26,8 +26,8 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
updateVideoChannel
|
updateVideoChannel
|
||||||
} from '../../../../shared/utils/index'
|
} from '../../../../shared/extra-utils/index'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import * as chai from 'chai'
|
import * as chai from 'chai'
|
||||||
import 'mocha'
|
import 'mocha'
|
||||||
import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model'
|
import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model'
|
||||||
import { testImage } from '../../../../shared/utils'
|
import { testImage } from '../../../../shared/extra-utils'
|
||||||
import {
|
import {
|
||||||
dateIsValid,
|
dateIsValid,
|
||||||
flushTests,
|
flushTests,
|
||||||
|
@ -13,14 +13,14 @@ import {
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
updateMyAvatar,
|
updateMyAvatar,
|
||||||
uploadVideo
|
uploadVideo
|
||||||
} from '../../../../shared/utils/index'
|
} from '../../../../shared/extra-utils/index'
|
||||||
import {
|
import {
|
||||||
addVideoCommentReply,
|
addVideoCommentReply,
|
||||||
addVideoCommentThread,
|
addVideoCommentThread,
|
||||||
deleteVideoComment,
|
deleteVideoComment,
|
||||||
getVideoCommentThreads,
|
getVideoCommentThreads,
|
||||||
getVideoThreadComments
|
getVideoThreadComments
|
||||||
} from '../../../../shared/utils/videos/video-comments'
|
} from '../../../../shared/extra-utils/videos/video-comments'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,9 @@ import {
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
updateVideo,
|
updateVideo,
|
||||||
uploadVideo
|
uploadVideo
|
||||||
} from '../../../../shared/utils/index'
|
} from '../../../../shared/extra-utils/index'
|
||||||
import { doubleFollow } from '../../../../shared/utils/server/follows'
|
import { doubleFollow } from '../../../../shared/extra-utils/server/follows'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ import {
|
||||||
updateVideo,
|
updateVideo,
|
||||||
uploadVideo,
|
uploadVideo,
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { VideoDetails } from '../../../../shared/models/videos'
|
import { VideoDetails } from '../../../../shared/models/videos'
|
||||||
import { VideoStreamingPlaylistType } from '../../../../shared/models/videos/video-streaming-playlist.type'
|
import { VideoStreamingPlaylistType } from '../../../../shared/models/videos/video-streaming-playlist.type'
|
||||||
import { join } from 'path'
|
import { join } from 'path'
|
||||||
|
|
|
@ -14,9 +14,9 @@ import {
|
||||||
killallServers,
|
killallServers,
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers
|
setAccessTokensToServers
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
import { getMagnetURI, getYoutubeVideoUrl, importVideo, getMyVideoImports } from '../../../../shared/utils/videos/video-imports'
|
import { getMagnetURI, getYoutubeVideoUrl, importVideo, getMyVideoImports } from '../../../../shared/extra-utils/videos/video-imports'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -9,10 +9,10 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
uploadVideo
|
uploadVideo
|
||||||
} from '../../../../shared/utils/index'
|
} from '../../../../shared/extra-utils/index'
|
||||||
import { userLogin } from '../../../../shared/utils/users/login'
|
import { userLogin } from '../../../../shared/extra-utils/users/login'
|
||||||
import { createUser } from '../../../../shared/utils/users/users'
|
import { createUser } from '../../../../shared/extra-utils/users/users'
|
||||||
import { getMyVideos } from '../../../../shared/utils/videos/videos'
|
import { getMyVideos } from '../../../../shared/extra-utils/videos/videos'
|
||||||
import {
|
import {
|
||||||
getAccountVideos,
|
getAccountVideos,
|
||||||
getConfig,
|
getConfig,
|
||||||
|
@ -25,7 +25,7 @@ import {
|
||||||
searchVideoWithToken,
|
searchVideoWithToken,
|
||||||
updateCustomConfig,
|
updateCustomConfig,
|
||||||
updateMyUser
|
updateMyUser
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { ServerConfig } from '../../../../shared/models'
|
import { ServerConfig } from '../../../../shared/models'
|
||||||
import { CustomConfig } from '../../../../shared/models/server/custom-config.model'
|
import { CustomConfig } from '../../../../shared/models/server/custom-config.model'
|
||||||
import { User } from '../../../../shared/models/users'
|
import { User } from '../../../../shared/models/users'
|
||||||
|
|
|
@ -36,7 +36,7 @@ import {
|
||||||
uploadVideoAndGetId,
|
uploadVideoAndGetId,
|
||||||
userLogin,
|
userLogin,
|
||||||
waitJobs
|
waitJobs
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model'
|
import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model'
|
||||||
import { VideoPlaylist } from '../../../../shared/models/videos/playlist/video-playlist.model'
|
import { VideoPlaylist } from '../../../../shared/models/videos/playlist/video-playlist.model'
|
||||||
import { Video } from '../../../../shared/models/videos'
|
import { Video } from '../../../../shared/models/videos'
|
||||||
|
|
|
@ -10,12 +10,12 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
uploadVideo
|
uploadVideo
|
||||||
} from '../../../../shared/utils/index'
|
} from '../../../../shared/extra-utils/index'
|
||||||
import { doubleFollow } from '../../../../shared/utils/server/follows'
|
import { doubleFollow } from '../../../../shared/extra-utils/server/follows'
|
||||||
import { userLogin } from '../../../../shared/utils/users/login'
|
import { userLogin } from '../../../../shared/extra-utils/users/login'
|
||||||
import { createUser } from '../../../../shared/utils/users/users'
|
import { createUser } from '../../../../shared/extra-utils/users/users'
|
||||||
import { getMyVideos, getVideo, getVideoWithToken, updateVideo } from '../../../../shared/utils/videos/videos'
|
import { getMyVideos, getVideo, getVideoWithToken, updateVideo } from '../../../../shared/extra-utils/videos/videos'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@ import {
|
||||||
updateVideo,
|
updateVideo,
|
||||||
uploadVideo,
|
uploadVideo,
|
||||||
wait
|
wait
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,9 @@ import {
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
uploadVideo,
|
uploadVideo,
|
||||||
webtorrentAdd
|
webtorrentAdd
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { extname, join } from 'path'
|
import { extname, join } from 'path'
|
||||||
import { waitJobs } from '../../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
|
||||||
import { VIDEO_TRANSCODING_FPS } from '../../../../server/initializers/constants'
|
import { VIDEO_TRANSCODING_FPS } from '../../../../server/initializers/constants'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
|
@ -13,7 +13,7 @@ import {
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
uploadVideo,
|
uploadVideo,
|
||||||
userLogin
|
userLogin
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { Video, VideoPrivacy } from '../../../../shared/models/videos'
|
import { Video, VideoPrivacy } from '../../../../shared/models/videos'
|
||||||
import { UserRole } from '../../../../shared/models/users'
|
import { UserRole } from '../../../../shared/models/users'
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,9 @@ import {
|
||||||
uploadVideo,
|
uploadVideo,
|
||||||
userLogin,
|
userLogin,
|
||||||
wait
|
wait
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { Video, VideoDetails } from '../../../../shared/models/videos'
|
import { Video, VideoDetails } from '../../../../shared/models/videos'
|
||||||
import { listMyVideosHistory, removeMyVideosHistory, userWatchVideo } from '../../../../shared/utils/videos/video-history'
|
import { listMyVideosHistory, removeMyVideosHistory, userWatchVideo } from '../../../../shared/extra-utils/videos/video-history'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
import * as chai from 'chai'
|
import * as chai from 'chai'
|
||||||
import 'mocha'
|
import 'mocha'
|
||||||
import { flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../../../shared/utils'
|
import { flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../../../shared/extra-utils'
|
||||||
import { getVideosOverview } from '../../../../shared/utils/overviews/overviews'
|
import { getVideosOverview } from '../../../../shared/extra-utils/overviews/overviews'
|
||||||
import { VideosOverview } from '../../../../shared/models/overviews'
|
import { VideosOverview } from '../../../../shared/models/overviews'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
|
@ -11,10 +11,10 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
uploadVideo, uploadVideoAndGetId, viewVideo, wait, countVideoViewsOf, doubleFollow, waitJobs
|
uploadVideo, uploadVideoAndGetId, viewVideo, wait, countVideoViewsOf, doubleFollow, waitJobs
|
||||||
} from '../../../../shared/utils'
|
} from '../../../../shared/extra-utils'
|
||||||
import { getVideosOverview } from '../../../../shared/utils/overviews/overviews'
|
import { getVideosOverview } from '../../../../shared/extra-utils/overviews/overviews'
|
||||||
import { VideosOverview } from '../../../../shared/models/overviews'
|
import { VideosOverview } from '../../../../shared/models/overviews'
|
||||||
import { listMyVideosHistory } from '../../../../shared/utils/videos/video-history'
|
import { listMyVideosHistory } from '../../../../shared/extra-utils/videos/video-history'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
uploadVideo
|
uploadVideo
|
||||||
} from '../../../shared/utils'
|
} from '../../../shared/extra-utils'
|
||||||
import { waitJobs } from '../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../shared/extra-utils/server/jobs'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
uploadVideo, wait
|
uploadVideo, wait
|
||||||
} from '../../../shared/utils'
|
} from '../../../shared/extra-utils'
|
||||||
import { waitJobs } from '../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../shared/extra-utils/server/jobs'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
uploadVideo, viewVideo, wait
|
uploadVideo, viewVideo, wait
|
||||||
} from '../../../shared/utils'
|
} from '../../../shared/extra-utils'
|
||||||
import { waitJobs } from '../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../shared/extra-utils/server/jobs'
|
||||||
import { getVideoFileBitrate, getVideoFileFPS, getVideoFileResolution } from '../../helpers/ffmpeg-utils'
|
import { getVideoFileBitrate, getVideoFileFPS, getVideoFileResolution } from '../../helpers/ffmpeg-utils'
|
||||||
import { VIDEO_TRANSCODING_FPS } from '../../initializers/constants'
|
import { VIDEO_TRANSCODING_FPS } from '../../initializers/constants'
|
||||||
import { join } from 'path'
|
import { join } from 'path'
|
||||||
|
|
|
@ -11,7 +11,7 @@ import {
|
||||||
runServer,
|
runServer,
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers
|
setAccessTokensToServers
|
||||||
} from '../../../shared/utils'
|
} from '../../../shared/extra-utils'
|
||||||
|
|
||||||
describe('Test CLI wrapper', function () {
|
describe('Test CLI wrapper', function () {
|
||||||
let server: ServerInfo
|
let server: ServerInfo
|
||||||
|
|
|
@ -10,7 +10,7 @@ import {
|
||||||
runServer,
|
runServer,
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers
|
setAccessTokensToServers
|
||||||
} from '../../../shared/utils'
|
} from '../../../shared/extra-utils'
|
||||||
|
|
||||||
describe('Test reset password scripts', function () {
|
describe('Test reset password scripts', function () {
|
||||||
let server: ServerInfo
|
let server: ServerInfo
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
import 'mocha'
|
import 'mocha'
|
||||||
import * as chai from 'chai'
|
import * as chai from 'chai'
|
||||||
import { VideoDetails } from '../../../shared/models/videos'
|
import { VideoDetails } from '../../../shared/models/videos'
|
||||||
import { waitJobs } from '../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../shared/extra-utils/server/jobs'
|
||||||
import { addVideoCommentThread } from '../../../shared/utils/videos/video-comments'
|
import { addVideoCommentThread } from '../../../shared/extra-utils/videos/video-comments'
|
||||||
import {
|
import {
|
||||||
addVideoChannel,
|
addVideoChannel,
|
||||||
createUser,
|
createUser,
|
||||||
|
@ -21,8 +21,8 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
uploadVideo
|
uploadVideo
|
||||||
} from '../../../shared/utils'
|
} from '../../../shared/extra-utils'
|
||||||
import { getAccountsList } from '../../../shared/utils/users/accounts'
|
import { getAccountsList } from '../../../shared/extra-utils/users/accounts'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ import {
|
||||||
updateCustomConfig,
|
updateCustomConfig,
|
||||||
updateCustomSubConfig,
|
updateCustomSubConfig,
|
||||||
uploadVideo
|
uploadVideo
|
||||||
} from '../../shared/utils'
|
} from '../../shared/extra-utils'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -13,10 +13,10 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
uploadVideo, userLogin
|
uploadVideo, userLogin
|
||||||
} from '../../../shared/utils'
|
} from '../../../shared/extra-utils'
|
||||||
import * as libxmljs from 'libxmljs'
|
import * as libxmljs from 'libxmljs'
|
||||||
import { addVideoCommentThread } from '../../../shared/utils/videos/video-comments'
|
import { addVideoCommentThread } from '../../../shared/extra-utils/videos/video-comments'
|
||||||
import { waitJobs } from '../../../shared/utils/server/jobs'
|
import { waitJobs } from '../../../shared/extra-utils/server/jobs'
|
||||||
import { User } from '../../../shared/models/users'
|
import { User } from '../../../shared/models/users'
|
||||||
|
|
||||||
chai.use(require('chai-xml'))
|
chai.use(require('chai-xml'))
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import 'mocha'
|
import 'mocha'
|
||||||
import { doRequest, doRequestAndSaveToFile } from '../../helpers/requests'
|
import { doRequest, doRequestAndSaveToFile } from '../../helpers/requests'
|
||||||
import { get4KFileUrl, root, wait } from '../../../shared/utils'
|
import { get4KFileUrl, root, wait } from '../../../shared/extra-utils'
|
||||||
import { join } from 'path'
|
import { join } from 'path'
|
||||||
import { pathExists, remove } from 'fs-extra'
|
import { pathExists, remove } from 'fs-extra'
|
||||||
import { expect } from 'chai'
|
import { expect } from 'chai'
|
||||||
|
|
|
@ -12,7 +12,7 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
uploadVideo
|
uploadVideo
|
||||||
} from '../../shared/utils'
|
} from '../../shared/extra-utils'
|
||||||
import { VideoPrivacy } from '../../shared/models/videos'
|
import { VideoPrivacy } from '../../shared/models/videos'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
|
@ -10,7 +10,7 @@ import {
|
||||||
ServerInfo,
|
ServerInfo,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
uploadVideo
|
uploadVideo
|
||||||
} from '../../../shared/utils'
|
} from '../../../shared/extra-utils'
|
||||||
import * as Bluebird from 'bluebird'
|
import * as Bluebird from 'bluebird'
|
||||||
|
|
||||||
start()
|
start()
|
||||||
|
|
|
@ -16,8 +16,8 @@ import {
|
||||||
updateVideo,
|
updateVideo,
|
||||||
uploadVideo, viewVideo,
|
uploadVideo, viewVideo,
|
||||||
wait
|
wait
|
||||||
} from '../../../shared/utils'
|
} from '../../../shared/extra-utils'
|
||||||
import { getJobsListPaginationAndSort } from '../../../shared/utils/server/jobs'
|
import { getJobsListPaginationAndSort } from '../../../shared/extra-utils/server/jobs'
|
||||||
|
|
||||||
interface ServerInfo extends DefaultServerInfo {
|
interface ServerInfo extends DefaultServerInfo {
|
||||||
requestsNumber: number
|
requestsNumber: number
|
||||||
|
|
|
@ -6,7 +6,7 @@ import {
|
||||||
Server,
|
Server,
|
||||||
Client,
|
Client,
|
||||||
User
|
User
|
||||||
} from '../../shared/utils'
|
} from '../../shared/extra-utils'
|
||||||
|
|
||||||
program
|
program
|
||||||
.option('-u, --url <url>', 'Server url')
|
.option('-u, --url <url>', 'Server url')
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { join } from 'path'
|
||||||
import { VideoPrivacy } from '../../shared/models/videos'
|
import { VideoPrivacy } from '../../shared/models/videos'
|
||||||
import { doRequestAndSaveToFile } from '../helpers/requests'
|
import { doRequestAndSaveToFile } from '../helpers/requests'
|
||||||
import { CONSTRAINTS_FIELDS } from '../initializers/constants'
|
import { CONSTRAINTS_FIELDS } from '../initializers/constants'
|
||||||
import { getClient, getVideoCategories, login, searchVideoWithSort, uploadVideo } from '../../shared/utils/index'
|
import { getClient, getVideoCategories, login, searchVideoWithSort, uploadVideo } from '../../shared/extra-utils/index'
|
||||||
import { truncate } from 'lodash'
|
import { truncate } from 'lodash'
|
||||||
import * as prompt from 'prompt'
|
import * as prompt from 'prompt'
|
||||||
import { remove } from 'fs-extra'
|
import { remove } from 'fs-extra'
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import * as program from 'commander'
|
import * as program from 'commander'
|
||||||
import { access, constants } from 'fs-extra'
|
import { access, constants } from 'fs-extra'
|
||||||
import { isAbsolute } from 'path'
|
import { isAbsolute } from 'path'
|
||||||
import { getClient, login } from '../../shared/utils'
|
import { getClient, login } from '../../shared/extra-utils'
|
||||||
import { uploadVideo } from '../../shared/utils/'
|
import { uploadVideo } from '../../shared/extra-utils/'
|
||||||
import { VideoPrivacy } from '../../shared/models/videos'
|
import { VideoPrivacy } from '../../shared/models/videos'
|
||||||
import { netrc, getSettings } from './cli'
|
import { netrc, getSettings } from './cli'
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ function webtorrentAdd (torrent: string, refreshWebTorrent = false) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function root () {
|
function root () {
|
||||||
// We are in /shared/utils/miscs
|
// We are in /miscs
|
||||||
return join(__dirname, '..', '..', '..')
|
return join(__dirname, '..', '..', '..')
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue