Fix tests
This commit is contained in:
parent
b1f5b93e4f
commit
8b0d42ee37
|
@ -10,7 +10,7 @@ import {
|
||||||
flushAndRunMultipleServers, flushTests, getVideosList, killallServers, ServerInfo, setAccessTokensToServers, uploadVideo,
|
flushAndRunMultipleServers, flushTests, getVideosList, killallServers, ServerInfo, setAccessTokensToServers, uploadVideo,
|
||||||
wait
|
wait
|
||||||
} from '../../utils/index'
|
} from '../../utils/index'
|
||||||
import { dateIsValid, webtorrentAdd } from '../../utils/miscs/miscs'
|
import { dateIsValid } from '../../utils/miscs/miscs'
|
||||||
import { follow, getFollowersListPaginationAndSort, getFollowingListPaginationAndSort, unfollow } from '../../utils/server/follows'
|
import { follow, getFollowersListPaginationAndSort, getFollowingListPaginationAndSort, unfollow } from '../../utils/server/follows'
|
||||||
import { userLogin } from '../../utils/users/login'
|
import { userLogin } from '../../utils/users/login'
|
||||||
import { createUser } from '../../utils/users/users'
|
import { createUser } from '../../utils/users/users'
|
||||||
|
@ -18,7 +18,7 @@ import {
|
||||||
addVideoCommentReply, addVideoCommentThread, getVideoCommentThreads,
|
addVideoCommentReply, addVideoCommentThread, getVideoCommentThreads,
|
||||||
getVideoThreadComments
|
getVideoThreadComments
|
||||||
} from '../../utils/videos/video-comments'
|
} from '../../utils/videos/video-comments'
|
||||||
import { getVideo, rateVideo, testVideoImage } from '../../utils/videos/videos'
|
import { rateVideo } from '../../utils/videos/videos'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ describe('Test multiple servers', function () {
|
||||||
description: 'super channel',
|
description: 'super channel',
|
||||||
isLocal
|
isLocal
|
||||||
},
|
},
|
||||||
fixture: 'video_short.webm',
|
fixture: 'video_short1.webm',
|
||||||
files: [
|
files: [
|
||||||
{
|
{
|
||||||
resolution: 720,
|
resolution: 720,
|
||||||
|
@ -289,7 +289,7 @@ describe('Test multiple servers', function () {
|
||||||
description: '',
|
description: '',
|
||||||
isLocal
|
isLocal
|
||||||
},
|
},
|
||||||
fixture: 'video_short3.webm',
|
fixture: 'video_short.webm',
|
||||||
files: [
|
files: [
|
||||||
{
|
{
|
||||||
resolution: 720,
|
resolution: 720,
|
||||||
|
|
|
@ -1,20 +1,12 @@
|
||||||
/* tslint:disable:no-unused-expression */
|
/* tslint:disable:no-unused-expression */
|
||||||
|
|
||||||
import 'mocha'
|
|
||||||
import * as chai from 'chai'
|
import * as chai from 'chai'
|
||||||
const expect = chai.expect
|
import 'mocha'
|
||||||
|
import { flushTests, getOEmbed, getVideosList, killallServers, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../utils/index'
|
||||||
import {
|
|
||||||
ServerInfo,
|
|
||||||
flushTests,
|
|
||||||
uploadVideo,
|
|
||||||
getVideosList,
|
|
||||||
setAccessTokensToServers,
|
|
||||||
killallServers,
|
|
||||||
getOEmbed
|
|
||||||
} from '../../utils/index'
|
|
||||||
import { runServer } from '../../utils/server/servers'
|
import { runServer } from '../../utils/server/servers'
|
||||||
|
|
||||||
|
const expect = chai.expect
|
||||||
|
|
||||||
describe('Test services', function () {
|
describe('Test services', function () {
|
||||||
let server: ServerInfo = null
|
let server: ServerInfo = null
|
||||||
|
|
||||||
|
@ -30,8 +22,10 @@ describe('Test services', function () {
|
||||||
const videoAttributes = {
|
const videoAttributes = {
|
||||||
name: 'my super name'
|
name: 'my super name'
|
||||||
}
|
}
|
||||||
const res = await uploadVideo(server.url, server.accessToken, videoAttributes)
|
await uploadVideo(server.url, server.accessToken, videoAttributes)
|
||||||
server.video = res.body.video
|
|
||||||
|
const res = await getVideosList(server.url)
|
||||||
|
server.video = res.body.data[0]
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should have a valid oEmbed response', async function () {
|
it('Should have a valid oEmbed response', async function () {
|
||||||
|
|
|
@ -6,32 +6,9 @@ import 'mocha'
|
||||||
import { join } from 'path'
|
import { join } from 'path'
|
||||||
import { VideoPrivacy } from '../../../../shared/models/videos'
|
import { VideoPrivacy } from '../../../../shared/models/videos'
|
||||||
import {
|
import {
|
||||||
dateIsValid,
|
completeVideoCheck, flushTests, getVideo, getVideoCategories, getVideoLanguages, getVideoLicences, getVideoPrivacies,
|
||||||
flushTests,
|
getVideosList, getVideosListPagination, getVideosListSort, killallServers, rateVideo, readdirPromise, removeVideo, runServer, searchVideo,
|
||||||
getVideo,
|
searchVideoWithPagination, searchVideoWithSort, ServerInfo, setAccessTokensToServers, testVideoImage, updateVideo, uploadVideo, viewVideo
|
||||||
getVideoCategories,
|
|
||||||
getVideoLanguages,
|
|
||||||
getVideoLicences,
|
|
||||||
getVideoPrivacies,
|
|
||||||
getVideosList,
|
|
||||||
getVideosListPagination,
|
|
||||||
getVideosListSort,
|
|
||||||
killallServers,
|
|
||||||
rateVideo,
|
|
||||||
readdirPromise,
|
|
||||||
removeVideo,
|
|
||||||
runServer,
|
|
||||||
searchVideo,
|
|
||||||
searchVideoWithPagination,
|
|
||||||
searchVideoWithSort,
|
|
||||||
ServerInfo,
|
|
||||||
setAccessTokensToServers,
|
|
||||||
testVideoImage,
|
|
||||||
updateVideo,
|
|
||||||
uploadVideo,
|
|
||||||
wait,
|
|
||||||
webtorrentAdd,
|
|
||||||
viewVideo, completeVideoCheck, immutableAssign
|
|
||||||
} from '../../utils'
|
} from '../../utils'
|
||||||
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
|
|
Loading…
Reference in New Issue
Block a user