diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/tests/api/server/follows.ts | 4 | ||||
-rw-r--r-- | server/tests/api/videos/multiple-servers.ts | 4 | ||||
-rw-r--r-- | server/tests/api/videos/services.ts | 22 | ||||
-rw-r--r-- | server/tests/api/videos/single-server.ts | 29 |
4 files changed, 15 insertions, 44 deletions
diff --git a/server/tests/api/server/follows.ts b/server/tests/api/server/follows.ts index 311631aae..fc9c5c3b6 100644 --- a/server/tests/api/server/follows.ts +++ b/server/tests/api/server/follows.ts | |||
@@ -10,7 +10,7 @@ import { | |||
10 | flushAndRunMultipleServers, flushTests, getVideosList, killallServers, ServerInfo, setAccessTokensToServers, uploadVideo, | 10 | flushAndRunMultipleServers, flushTests, getVideosList, killallServers, ServerInfo, setAccessTokensToServers, uploadVideo, |
11 | wait | 11 | wait |
12 | } from '../../utils/index' | 12 | } from '../../utils/index' |
13 | import { dateIsValid, webtorrentAdd } from '../../utils/miscs/miscs' | 13 | import { dateIsValid } from '../../utils/miscs/miscs' |
14 | import { follow, getFollowersListPaginationAndSort, getFollowingListPaginationAndSort, unfollow } from '../../utils/server/follows' | 14 | import { follow, getFollowersListPaginationAndSort, getFollowingListPaginationAndSort, unfollow } from '../../utils/server/follows' |
15 | import { userLogin } from '../../utils/users/login' | 15 | import { userLogin } from '../../utils/users/login' |
16 | import { createUser } from '../../utils/users/users' | 16 | import { createUser } from '../../utils/users/users' |
@@ -18,7 +18,7 @@ import { | |||
18 | addVideoCommentReply, addVideoCommentThread, getVideoCommentThreads, | 18 | addVideoCommentReply, addVideoCommentThread, getVideoCommentThreads, |
19 | getVideoThreadComments | 19 | getVideoThreadComments |
20 | } from '../../utils/videos/video-comments' | 20 | } from '../../utils/videos/video-comments' |
21 | import { getVideo, rateVideo, testVideoImage } from '../../utils/videos/videos' | 21 | import { rateVideo } from '../../utils/videos/videos' |
22 | 22 | ||
23 | const expect = chai.expect | 23 | const expect = chai.expect |
24 | 24 | ||
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts index d35d1204a..abd051a30 100644 --- a/server/tests/api/videos/multiple-servers.ts +++ b/server/tests/api/videos/multiple-servers.ts | |||
@@ -98,7 +98,7 @@ describe('Test multiple servers', function () { | |||
98 | description: 'super channel', | 98 | description: 'super channel', |
99 | isLocal | 99 | isLocal |
100 | }, | 100 | }, |
101 | fixture: 'video_short.webm', | 101 | fixture: 'video_short1.webm', |
102 | files: [ | 102 | files: [ |
103 | { | 103 | { |
104 | resolution: 720, | 104 | resolution: 720, |
@@ -289,7 +289,7 @@ describe('Test multiple servers', function () { | |||
289 | description: '', | 289 | description: '', |
290 | isLocal | 290 | isLocal |
291 | }, | 291 | }, |
292 | fixture: 'video_short3.webm', | 292 | fixture: 'video_short.webm', |
293 | files: [ | 293 | files: [ |
294 | { | 294 | { |
295 | resolution: 720, | 295 | resolution: 720, |
diff --git a/server/tests/api/videos/services.ts b/server/tests/api/videos/services.ts index b3167aebc..699f79ab7 100644 --- a/server/tests/api/videos/services.ts +++ b/server/tests/api/videos/services.ts | |||
@@ -1,20 +1,12 @@ | |||
1 | /* tslint:disable:no-unused-expression */ | 1 | /* tslint:disable:no-unused-expression */ |
2 | 2 | ||
3 | import 'mocha' | ||
4 | import * as chai from 'chai' | 3 | import * as chai from 'chai' |
5 | const expect = chai.expect | 4 | import 'mocha' |
6 | 5 | import { flushTests, getOEmbed, getVideosList, killallServers, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../utils/index' | |
7 | import { | ||
8 | ServerInfo, | ||
9 | flushTests, | ||
10 | uploadVideo, | ||
11 | getVideosList, | ||
12 | setAccessTokensToServers, | ||
13 | killallServers, | ||
14 | getOEmbed | ||
15 | } from '../../utils/index' | ||
16 | import { runServer } from '../../utils/server/servers' | 6 | import { runServer } from '../../utils/server/servers' |
17 | 7 | ||
8 | const expect = chai.expect | ||
9 | |||
18 | describe('Test services', function () { | 10 | describe('Test services', function () { |
19 | let server: ServerInfo = null | 11 | let server: ServerInfo = null |
20 | 12 | ||
@@ -30,8 +22,10 @@ describe('Test services', function () { | |||
30 | const videoAttributes = { | 22 | const videoAttributes = { |
31 | name: 'my super name' | 23 | name: 'my super name' |
32 | } | 24 | } |
33 | const res = await uploadVideo(server.url, server.accessToken, videoAttributes) | 25 | await uploadVideo(server.url, server.accessToken, videoAttributes) |
34 | server.video = res.body.video | 26 | |
27 | const res = await getVideosList(server.url) | ||
28 | server.video = res.body.data[0] | ||
35 | }) | 29 | }) |
36 | 30 | ||
37 | it('Should have a valid oEmbed response', async function () { | 31 | it('Should have a valid oEmbed response', async function () { |
diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts index 934c653b1..2a3126f32 100644 --- a/server/tests/api/videos/single-server.ts +++ b/server/tests/api/videos/single-server.ts | |||
@@ -6,32 +6,9 @@ import 'mocha' | |||
6 | import { join } from 'path' | 6 | import { join } from 'path' |
7 | import { VideoPrivacy } from '../../../../shared/models/videos' | 7 | import { VideoPrivacy } from '../../../../shared/models/videos' |
8 | import { | 8 | import { |
9 | dateIsValid, | 9 | completeVideoCheck, flushTests, getVideo, getVideoCategories, getVideoLanguages, getVideoLicences, getVideoPrivacies, |
10 | flushTests, | 10 | getVideosList, getVideosListPagination, getVideosListSort, killallServers, rateVideo, readdirPromise, removeVideo, runServer, searchVideo, |
11 | getVideo, | 11 | searchVideoWithPagination, searchVideoWithSort, ServerInfo, setAccessTokensToServers, testVideoImage, updateVideo, uploadVideo, viewVideo |
12 | getVideoCategories, | ||
13 | getVideoLanguages, | ||
14 | getVideoLicences, | ||
15 | getVideoPrivacies, | ||
16 | getVideosList, | ||
17 | getVideosListPagination, | ||
18 | getVideosListSort, | ||
19 | killallServers, | ||
20 | rateVideo, | ||
21 | readdirPromise, | ||
22 | removeVideo, | ||
23 | runServer, | ||
24 | searchVideo, | ||
25 | searchVideoWithPagination, | ||
26 | searchVideoWithSort, | ||
27 | ServerInfo, | ||
28 | setAccessTokensToServers, | ||
29 | testVideoImage, | ||
30 | updateVideo, | ||
31 | uploadVideo, | ||
32 | wait, | ||
33 | webtorrentAdd, | ||
34 | viewVideo, completeVideoCheck, immutableAssign | ||
35 | } from '../../utils' | 12 | } from '../../utils' |
36 | 13 | ||
37 | const expect = chai.expect | 14 | const expect = chai.expect |