aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/resumable-upload.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-22 14:28:03 +0200
committerChocobozzz <chocobozzz@cpy.re>2021-07-26 11:29:31 +0200
commit83903cb65d531a6b6b91715387493ba8312b264d (patch)
treefd172e26a483331e74f15a062743a9d40d4016d3 /server/tests/api/videos/resumable-upload.ts
parentc4fa01f7c45b66b112ebd08abce744b7c4041feb (diff)
downloadPeerTube-83903cb65d531a6b6b91715387493ba8312b264d.tar.gz
PeerTube-83903cb65d531a6b6b91715387493ba8312b264d.tar.zst
PeerTube-83903cb65d531a6b6b91715387493ba8312b264d.zip
Generate random uuid for video files
Diffstat (limited to 'server/tests/api/videos/resumable-upload.ts')
-rw-r--r--server/tests/api/videos/resumable-upload.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/tests/api/videos/resumable-upload.ts b/server/tests/api/videos/resumable-upload.ts
index a2d60eeec..c94d92cf2 100644
--- a/server/tests/api/videos/resumable-upload.ts
+++ b/server/tests/api/videos/resumable-upload.ts
@@ -99,8 +99,8 @@ describe('Test resumable upload', function () {
99 this.timeout(30000) 99 this.timeout(30000)
100 100
101 server = await createSingleServer(1) 101 server = await createSingleServer(1)
102 await setAccessTokensToServers([server]) 102 await setAccessTokensToServers([ server ])
103 await setDefaultVideoChannel([server]) 103 await setDefaultVideoChannel([ server ])
104 104
105 const body = await server.users.getMyInfo() 105 const body = await server.users.getMyInfo()
106 rootId = body.id 106 rootId = body.id
@@ -170,13 +170,13 @@ describe('Test resumable upload', function () {
170 170
171 const size = 1000 171 const size = 1000
172 172
173 const contentRangeBuilder = start => `bytes ${start}-${start + size - 1}/${size}` 173 const contentRangeBuilder = (start: number) => `bytes ${start}-${start + size - 1}/${size}`
174 await sendChunks({ pathUploadId: uploadId, expectedStatus: HttpStatusCode.CONFLICT_409, contentRangeBuilder, contentLength: size }) 174 await sendChunks({ pathUploadId: uploadId, expectedStatus: HttpStatusCode.CONFLICT_409, contentRangeBuilder, contentLength: size })
175 await checkFileSize(uploadId, 0) 175 await checkFileSize(uploadId, 0)
176 }) 176 })
177 }) 177 })
178 178
179 after(async function () { 179 after(async function () {
180 await cleanupTests([server]) 180 await cleanupTests([ server ])
181 }) 181 })
182}) 182})