Tests directories refractor

This commit is contained in:
Chocobozzz
2017-12-28 13:59:22 +01:00
parent db799da3d2
commit c5d31dba56
38 changed files with 98 additions and 95 deletions

View File

@@ -9,7 +9,7 @@ import {
setAccessTokensToServers,
killallServers
} from '../../utils'
import { getVideosList, uploadVideo } from '../../utils/videos'
import { getVideosList, uploadVideo } from '../../utils/videos/videos'
describe('Test services API validators', function () {
let server

View File

@@ -3,7 +3,7 @@
import 'mocha'
import * as request from 'supertest'
import { flushTests, killallServers, makePostBodyRequest, runServer, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../utils'
import { addVideoCommentThread } from '../../utils/video-comments'
import { addVideoCommentThread } from '../../utils/videos/video-comments'
describe('Test video comments API validator', function () {
let pathThread: string

View File

@@ -1,11 +1,11 @@
// Order of the tests we want to execute
import './config'
import './server/config'
import './check-params'
import './users'
import './single-server'
import './video-abuse'
import './video-blacklist'
import './video-blacklist-management'
import './video-description'
import './video-privacy'
import './services'
import './users/users'
import './videos/single-server'
import './videos/video-abuse'
import './videos/video-blacklist'
import './videos/video-blacklist-management'
import './videos/video-description'
import './videos/video-privacy'
import './videos/services'

View File

@@ -1,7 +1,7 @@
// Order of the tests we want to execute
// import './multiple-servers'
import './video-transcoder'
import './multiple-servers'
import './follows'
import './jobs'
import './video-comments'
import './videos/video-transcoder'
import './videos/multiple-servers'
import './server/follows'
import './server/jobs'
import './videos/video-comments'

View File

@@ -9,7 +9,7 @@ import {
flushTests,
runServer,
registerUser
} from '../utils'
} from '../../utils/index'
describe('Test config', function () {
let server = null

View File

@@ -2,18 +2,21 @@
import * as chai from 'chai'
import 'mocha'
import { VideoComment, VideoCommentThreadTree } from '../../../shared/models/videos/video-comment.model'
import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model'
import {
flushAndRunMultipleServers, flushTests, getVideosList, killallServers, ServerInfo, setAccessTokensToServers, uploadVideo,
wait
} from '../utils'
import { follow, getFollowersListPaginationAndSort, getFollowingListPaginationAndSort, unfollow } from '../utils/follows'
import { getUserAccessToken } from '../utils/login'
import { dateIsValid, webtorrentAdd } from '../utils/miscs'
import { createUser } from '../utils/users'
import { addVideoCommentReply, addVideoCommentThread, getVideoCommentThreads, getVideoThreadComments } from '../utils/video-comments'
import { getVideo, rateVideo, testVideoImage } from '../utils/videos'
} from '../../utils/index'
import { dateIsValid, webtorrentAdd } from '../../utils/miscs/miscs'
import { follow, getFollowersListPaginationAndSort, getFollowingListPaginationAndSort, unfollow } from '../../utils/server/follows'
import { getUserAccessToken } from '../../utils/users/login'
import { createUser } from '../../utils/users/users'
import {
addVideoCommentReply, addVideoCommentThread, getVideoCommentThreads,
getVideoThreadComments
} from '../../utils/videos/video-comments'
import { getVideo, rateVideo, testVideoImage } from '../../utils/videos/videos'
const expect = chai.expect

View File

@@ -2,12 +2,12 @@
import * as chai from 'chai'
import 'mocha'
import { flushTests, killallServers, ServerInfo, setAccessTokensToServers, wait } from '../utils'
import { doubleFollow } from '../utils/follows'
import { getJobsList, getJobsListPaginationAndSort } from '../utils/jobs'
import { flushAndRunMultipleServers } from '../utils/servers'
import { uploadVideo } from '../utils/videos'
import { dateIsValid } from '../utils/miscs'
import { flushTests, killallServers, ServerInfo, setAccessTokensToServers, wait } from '../../utils/index'
import { doubleFollow } from '../../utils/server/follows'
import { getJobsList, getJobsListPaginationAndSort } from '../../utils/server/jobs'
import { flushAndRunMultipleServers } from '../../utils/server/servers'
import { uploadVideo } from '../../utils/videos/videos'
import { dateIsValid } from '../../utils/miscs/miscs'
const expect = chai.expect

View File

@@ -2,7 +2,7 @@
import * as chai from 'chai'
import 'mocha'
import { UserRole } from '../../../shared'
import { UserRole } from '../../../../shared/index'
import {
createUser,
flushTests,
@@ -26,10 +26,10 @@ import {
updateMyUser,
updateUser,
uploadVideo
} from '../utils'
import { follow } from '../utils/follows'
import { getMyVideos } from '../utils/videos'
import { setAccessTokensToServers } from '../utils/login'
} from '../../utils/index'
import { follow } from '../../utils/server/follows'
import { getMyVideos } from '../../utils/videos/videos'
import { setAccessTokensToServers } from '../../utils/users/login'
const expect = chai.expect

View File

@@ -4,16 +4,19 @@ import * as chai from 'chai'
import 'mocha'
import { join } from 'path'
import * as request from 'supertest'
import { VideoComment, VideoCommentThreadTree } from '../../../shared/models/videos/video-comment.model'
import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model'
import {
addVideoChannel, dateIsValid, doubleFollow, flushAndRunMultipleServers, flushTests, getUserAccessToken, getVideo,
getVideoChannelsList, getVideosList, killallServers, rateVideo, removeVideo, ServerInfo, setAccessTokensToServers, testVideoImage,
updateVideo, uploadVideo, wait, webtorrentAdd
} from '../utils'
import { createUser } from '../utils/users'
import { addVideoCommentReply, addVideoCommentThread, getVideoCommentThreads, getVideoThreadComments } from '../utils/video-comments'
import { viewVideo } from '../utils/videos'
} from '../../utils/index'
import { createUser } from '../../utils/users/users'
import {
addVideoCommentReply, addVideoCommentThread, getVideoCommentThreads,
getVideoThreadComments
} from '../../utils/videos/video-comments'
import { viewVideo } from '../../utils/videos/videos'
const expect = chai.expect

View File

@@ -12,8 +12,8 @@ import {
setAccessTokensToServers,
killallServers,
getOEmbed
} from '../utils'
import { runServer } from '../utils/servers'
} from '../../utils/index'
import { runServer } from '../../utils/server/servers'
describe('Test services', function () {
let server: ServerInfo = null

View File

@@ -30,8 +30,8 @@ import {
uploadVideo,
wait,
webtorrentAdd
} from '../utils'
import { viewVideo } from '../utils/videos'
} from '../../utils/index'
import { viewVideo } from '../../utils/videos/videos'
const expect = chai.expect

View File

@@ -13,8 +13,8 @@ import {
setAccessTokensToServers,
uploadVideo,
wait
} from '../utils'
import { doubleFollow } from '../utils/follows'
} from '../../utils/index'
import { doubleFollow } from '../../utils/server/follows'
const expect = chai.expect

View File

@@ -16,8 +16,8 @@ import {
setAccessTokensToServers,
uploadVideo,
wait
} from '../utils'
import { doubleFollow } from '../utils/follows'
} from '../../utils/index'
import { doubleFollow } from '../../utils/server/follows'
const expect = chai.expect
const orderBy = lodash.orderBy

View File

@@ -13,8 +13,8 @@ import {
setAccessTokensToServers,
uploadVideo,
wait
} from '../utils'
import { doubleFollow } from '../utils/follows'
} from '../../utils/index'
import { doubleFollow } from '../../utils/server/follows'
const expect = chai.expect

View File

@@ -17,8 +17,8 @@ import {
updateVideoChannel,
deleteVideoChannel,
getVideoChannel
} from '../utils'
import { User } from '../../../shared'
} from '../../utils/index'
import { User } from '../../../../shared/index'
describe('Test a video channels', function () {
let server: ServerInfo

View File

@@ -2,9 +2,12 @@
import * as chai from 'chai'
import 'mocha'
import { VideoComment, VideoCommentThreadTree } from '../../../shared/models/videos/video-comment.model'
import { dateIsValid, flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers, uploadVideo } from '../utils'
import { addVideoCommentReply, addVideoCommentThread, getVideoCommentThreads, getVideoThreadComments } from '../utils/video-comments'
import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model'
import { dateIsValid, flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../utils/index'
import {
addVideoCommentReply, addVideoCommentThread, getVideoCommentThreads,
getVideoThreadComments
} from '../../utils/videos/video-comments'
const expect = chai.expect

View File

@@ -14,8 +14,8 @@ import {
updateVideo,
uploadVideo,
wait
} from '../utils'
import { doubleFollow } from '../utils/follows'
} from '../../utils/index'
import { doubleFollow } from '../../utils/server/follows'
const expect = chai.expect

View File

@@ -2,7 +2,7 @@
import * as chai from 'chai'
import 'mocha'
import { VideoPrivacy } from '../../../shared/models/videos/video-privacy.enum'
import { VideoPrivacy } from '../../../../shared/models/videos/video-privacy.enum'
import {
flushAndRunMultipleServers,
flushTests,
@@ -12,11 +12,11 @@ import {
setAccessTokensToServers,
uploadVideo,
wait
} from '../utils'
import { doubleFollow } from '../utils/follows'
import { getUserAccessToken } from '../utils/login'
import { createUser } from '../utils/users'
import { getMyVideos, getVideo, getVideoWithToken, updateVideo } from '../utils/videos'
} from '../../utils/index'
import { doubleFollow } from '../../utils/server/follows'
import { getUserAccessToken } from '../../utils/users/login'
import { createUser } from '../../utils/users/users'
import { getMyVideos, getVideo, getVideoWithToken, updateVideo } from '../../utils/videos/videos'
const expect = chai.expect

View File

@@ -15,7 +15,7 @@ import {
killallServers,
webtorrentAdd,
getVideo
} from '../utils'
} from '../../utils/index'
describe('Test video transcoding', function () {
let servers: ServerInfo[] = []