import 'mocha'
-import { flushAndRunMultipleServers, flushTests, killallServers, ServerInfo } from '../../utils'
+import {
+ flushAndRunMultipleServers,
+ flushTests,
+ killallServers,
+ ServerInfo
+} from '../../../../shared/utils'
- import {
- makePOSTAPRequest,
- makeFollowRequest,
- } from '../../utils/requests/activitypub'
import { HTTP_SIGNATURE } from '../../../initializers'
import { buildDigest, buildGlobalHeaders } from '../../../lib/job-queue/handlers/utils/activitypub-http-utils'
import * as chai from 'chai'
createUser,
doubleFollow,
flushAndRunMultipleServers,
- getVideoChannelVideos, serverLogin, testImage,
+ getVideoChannelVideos,
+ testImage,
updateVideo,
updateVideoChannelAvatar,
- uploadVideo, wait, userLogin
+ uploadVideo,
+ userLogin
-} from '../../utils'
+} from '../../../../shared/utils'
import {
addVideoChannel,
deleteVideoChannel,
updateVideo,
uploadVideo,
wait
-} from '../../utils'
-import { waitJobs } from '../../utils/server/jobs'
+} from '../../../../shared/utils'
- import { join } from 'path'
+import { waitJobs } from '../../../../shared/utils/server/jobs'
const expect = chai.expect
ServerInfo,
setAccessTokensToServers,
uploadVideo,
- webtorrentAdd,
- generateHighBitrateVideo
+ webtorrentAdd
-} from '../../utils'
+} from '../../../../shared/utils'
import { join } from 'path'
-import { waitJobs } from '../../utils/server/jobs'
+import { waitJobs } from '../../../../shared/utils/server/jobs'
+import { pathExists } from 'fs-extra'
import { VIDEO_TRANSCODING_FPS } from '../../../../server/initializers/constants'
const expect = chai.expect
/* tslint:disable:no-unused-expression */
import * as request from 'supertest'
-import { VideosSearchQuery } from '../../../../shared/models/search'
+import { VideosSearchQuery } from '../../models/search'
- import { immutableAssign } from '..'
+ import { immutableAssign } from '../miscs/miscs'
function searchVideo (url: string, search: string) {
const path = '/api/v1/search/videos'
- import { makeDeleteRequest, makeGetRequest, makePutBodyRequest } from '../'
+ import { makeDeleteRequest, makeGetRequest, makePutBodyRequest } from '../requests/requests'
-import { CustomConfig } from '../../../../shared/models/server/custom-config.model'
+import { CustomConfig } from '../../models/server/custom-config.model'
function getConfig (url: string) {
const path = '/api/v1/config'
import * as request from 'supertest'
-import { Job, JobState } from '../../../../shared/models'
-import { ServerInfo } from './servers'
+import { Job, JobState } from '../../models'
- import { ServerInfo, wait } from '../index'
+ import { wait } from '../miscs/miscs'
++import { ServerInfo } from './servers'
function getJobsList (url: string, accessToken: string, state: JobState) {
const path = '/api/v1/jobs/' + state
import { expect } from 'chai'
import { existsSync, readdir } from 'fs-extra'
import { join } from 'path'
-import { Account } from '../../../../shared/models/actors'
+import { Account } from '../../models/actors'
- import { root } from '../index'
+ import { root } from '../miscs/miscs'
import { makeGetRequest } from '../requests/requests'
function getAccountsList (url: string, sort = '-createdAt', statusCodeExpected = 200) {
import * as request from 'supertest'
- import { makePostBodyRequest, makePutBodyRequest, updateAvatarRequest } from '../'
+ import { makePostBodyRequest, makePutBodyRequest, updateAvatarRequest } from '../requests/requests'
-import { UserRole } from '../../../../shared/index'
-import { NSFWPolicyType } from '../../../../shared/models/videos/nsfw-policy.type'
+import { UserRole } from '../../index'
+import { NSFWPolicyType } from '../../models/videos/nsfw-policy.type'
function createUser (
url: string,
import * as request from 'supertest'
-import { VideoAbuseUpdate } from '../../../../shared/models/videos/abuse/video-abuse-update.model'
+import { VideoAbuseUpdate } from '../../models/videos/abuse/video-abuse-update.model'
- import { makeDeleteRequest, makePutBodyRequest } from '..'
+ import { makeDeleteRequest, makePutBodyRequest } from '../requests/requests'
function reportVideoAbuse (url: string, token: string, videoId: number | string, reason: string, specialStatus = 200) {
const path = '/api/v1/videos/' + videoId + '/abuse'
import * as request from 'supertest'
-import { VideoChannelCreate, VideoChannelUpdate } from '../../../../shared/models/videos'
+import { VideoChannelCreate, VideoChannelUpdate } from '../../models/videos'
- import { updateAvatarRequest } from '../index'
+ import { updateAvatarRequest } from '../requests/requests'
function getVideoChannelsList (url: string, start: number, count: number, sort?: string) {
const path = '/api/v1/video-channels'
-import { VideoImportCreate } from '../../../../shared/models/videos'
++
+import { VideoImportCreate } from '../../models/videos'
- import { makeGetRequest, makeUploadRequest } from '..'
+ import { makeGetRequest, makeUploadRequest } from '../requests/requests'
function getYoutubeVideoUrl () {
return 'https://youtu.be/msX3jv1XdvM'
ServerInfo,
testImage
} from '../'
-import { VideoDetails, VideoPrivacy } from '../../../../shared/models/videos'
-import { VIDEO_CATEGORIES, VIDEO_LANGUAGES, VIDEO_LICENCES, VIDEO_PRIVACIES } from '../../../initializers/constants'
++
+import { VideoDetails, VideoPrivacy } from '../../models/videos'
- import { VIDEO_CATEGORIES, VIDEO_LANGUAGES, VIDEO_LICENCES, VIDEO_PRIVACIES } from '../../../server/initializers'
- import { dateIsValid, webtorrentAdd } from '../index'
++import { VIDEO_CATEGORIES, VIDEO_LANGUAGES, VIDEO_LICENCES, VIDEO_PRIVACIES } from '../../../server/initializers/constants'
+ import { dateIsValid, webtorrentAdd } from '../miscs/miscs'
type VideoAttributes = {
name?: string