aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/multiple-servers.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/videos/multiple-servers.ts')
-rw-r--r--server/tests/api/videos/multiple-servers.ts24
1 files changed, 23 insertions, 1 deletions
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts
index ecdd36613..05ccee8ad 100644
--- a/server/tests/api/videos/multiple-servers.ts
+++ b/server/tests/api/videos/multiple-servers.ts
@@ -17,8 +17,11 @@ import {
17 cleanupTests, 17 cleanupTests,
18 createMultipleServers, 18 createMultipleServers,
19 doubleFollow, 19 doubleFollow,
20 makeGetRequest,
20 PeerTubeServer, 21 PeerTubeServer,
21 setAccessTokensToServers, 22 setAccessTokensToServers,
23 setDefaultAccountAvatar,
24 setDefaultChannelAvatar,
22 waitJobs, 25 waitJobs,
23 webtorrentAdd 26 webtorrentAdd
24} from '@shared/server-commands' 27} from '@shared/server-commands'
@@ -46,6 +49,9 @@ describe('Test multiple servers', function () {
46 description: 'super channel' 49 description: 'super channel'
47 } 50 }
48 await servers[0].channels.create({ attributes: videoChannel }) 51 await servers[0].channels.create({ attributes: videoChannel })
52 await setDefaultChannelAvatar(servers[0], videoChannel.name)
53 await setDefaultAccountAvatar(servers)
54
49 const { data } = await servers[0].channels.list({ start: 0, count: 1 }) 55 const { data } = await servers[0].channels.list({ start: 0, count: 1 })
50 videoChannelId = data[0].id 56 videoChannelId = data[0].id
51 } 57 }
@@ -133,6 +139,22 @@ describe('Test multiple servers', function () {
133 139
134 await completeVideoCheck(server, video, checkAttributes) 140 await completeVideoCheck(server, video, checkAttributes)
135 publishedAt = video.publishedAt as string 141 publishedAt = video.publishedAt as string
142
143 expect(video.channel.avatars).to.have.lengthOf(2)
144 expect(video.account.avatars).to.have.lengthOf(2)
145
146 for (const image of [ ...video.channel.avatars, ...video.account.avatars ]) {
147 expect(image.createdAt).to.exist
148 expect(image.updatedAt).to.exist
149 expect(image.width).to.be.above(20).and.below(1000)
150 expect(image.path).to.exist
151
152 await makeGetRequest({
153 url: server.url,
154 path: image.path,
155 expectedStatus: HttpStatusCode.OK_200
156 })
157 }
136 } 158 }
137 }) 159 })
138 160
@@ -207,7 +229,7 @@ describe('Test multiple servers', function () {
207 }, 229 },
208 { 230 {
209 resolution: 720, 231 resolution: 720,
210 size: 788000 232 size: 750000
211 } 233 }
212 ], 234 ],
213 thumbnailfile: 'thumbnail', 235 thumbnailfile: 'thumbnail',