diff options
Diffstat (limited to 'server/tests/api')
-rw-r--r-- | server/tests/api/video-description.ts | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/server/tests/api/video-description.ts b/server/tests/api/video-description.ts index f04c5f1f6..43d99e9e6 100644 --- a/server/tests/api/video-description.ts +++ b/server/tests/api/video-description.ts | |||
@@ -14,7 +14,8 @@ import { | |||
14 | setAccessTokensToServers, | 14 | setAccessTokensToServers, |
15 | uploadVideo, | 15 | uploadVideo, |
16 | wait, | 16 | wait, |
17 | getVideoDescription | 17 | getVideoDescription, |
18 | updateVideo | ||
18 | } from '../utils' | 19 | } from '../utils' |
19 | 20 | ||
20 | const expect = chai.expect | 21 | const expect = chai.expect |
@@ -22,6 +23,7 @@ const expect = chai.expect | |||
22 | describe('Test video description', function () { | 23 | describe('Test video description', function () { |
23 | let servers: ServerInfo[] = [] | 24 | let servers: ServerInfo[] = [] |
24 | let videoUUID = '' | 25 | let videoUUID = '' |
26 | let videoId: number | ||
25 | let longDescription = 'my super description for pod 1'.repeat(50) | 27 | let longDescription = 'my super description for pod 1'.repeat(50) |
26 | 28 | ||
27 | before(async function () { | 29 | before(async function () { |
@@ -49,6 +51,7 @@ describe('Test video description', function () { | |||
49 | 51 | ||
50 | const res = await getVideosList(servers[0].url) | 52 | const res = await getVideosList(servers[0].url) |
51 | 53 | ||
54 | videoId = res.body.data[0].id | ||
52 | videoUUID = res.body.data[0].uuid | 55 | videoUUID = res.body.data[0].uuid |
53 | }) | 56 | }) |
54 | 57 | ||
@@ -75,6 +78,29 @@ describe('Test video description', function () { | |||
75 | } | 78 | } |
76 | }) | 79 | }) |
77 | 80 | ||
81 | it('Should update with a short description', async function () { | ||
82 | this.timeout(15000) | ||
83 | |||
84 | const attributes = { | ||
85 | description: 'short description' | ||
86 | } | ||
87 | await updateVideo(servers[0].url, servers[0].accessToken, videoId, attributes) | ||
88 | |||
89 | await wait(11000) | ||
90 | }) | ||
91 | |||
92 | it('Should have a small description on each pod', async function () { | ||
93 | for (const server of servers) { | ||
94 | const res = await getVideo(server.url, videoUUID) | ||
95 | const video = res.body | ||
96 | |||
97 | expect(video.description).to.equal('short description') | ||
98 | |||
99 | const res2 = await getVideoDescription(server.url, video.descriptionPath) | ||
100 | expect(res2.body.description).to.equal('short description') | ||
101 | } | ||
102 | }) | ||
103 | |||
78 | after(async function () { | 104 | after(async function () { |
79 | killallServers(servers) | 105 | killallServers(servers) |
80 | 106 | ||