aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/resumable-upload.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-13 09:43:59 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commit6c5065a011b099618681a37bd77eaa7bd3db752e (patch)
tree352252a00b25013c4b1902f6bcd9668aba295c7b /server/tests/api/videos/resumable-upload.ts
parent0d8ecb7592577f54012413a2b5a9b159cfc90399 (diff)
downloadPeerTube-6c5065a011b099618681a37bd77eaa7bd3db752e.tar.gz
PeerTube-6c5065a011b099618681a37bd77eaa7bd3db752e.tar.zst
PeerTube-6c5065a011b099618681a37bd77eaa7bd3db752e.zip
Introduce server commands
Diffstat (limited to 'server/tests/api/videos/resumable-upload.ts')
-rw-r--r--server/tests/api/videos/resumable-upload.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/server/tests/api/videos/resumable-upload.ts b/server/tests/api/videos/resumable-upload.ts
index 6c01c7e78..5845efc86 100644
--- a/server/tests/api/videos/resumable-upload.ts
+++ b/server/tests/api/videos/resumable-upload.ts
@@ -7,7 +7,6 @@ import { join } from 'path'
7import { HttpStatusCode } from '@shared/core-utils' 7import { HttpStatusCode } from '@shared/core-utils'
8import { 8import {
9 buildAbsoluteFixturePath, 9 buildAbsoluteFixturePath,
10 buildServerDirectory,
11 cleanupTests, 10 cleanupTests,
12 flushAndRunServer, 11 flushAndRunServer,
13 getMyUserInformation, 12 getMyUserInformation,
@@ -82,7 +81,7 @@ describe('Test resumable upload', function () {
82 const uploadId = uploadIdArg.replace(/^upload_id=/, '') 81 const uploadId = uploadIdArg.replace(/^upload_id=/, '')
83 82
84 const subPath = join('tmp', 'resumable-uploads', uploadId) 83 const subPath = join('tmp', 'resumable-uploads', uploadId)
85 const filePath = buildServerDirectory(server, subPath) 84 const filePath = server.serversCommand.buildDirectory(subPath)
86 const exists = await pathExists(filePath) 85 const exists = await pathExists(filePath)
87 86
88 if (expectedSize === null) { 87 if (expectedSize === null) {
@@ -97,7 +96,7 @@ describe('Test resumable upload', function () {
97 96
98 async function countResumableUploads () { 97 async function countResumableUploads () {
99 const subPath = join('tmp', 'resumable-uploads') 98 const subPath = join('tmp', 'resumable-uploads')
100 const filePath = buildServerDirectory(server, subPath) 99 const filePath = server.serversCommand.buildDirectory(subPath)
101 100
102 const files = await readdir(filePath) 101 const files = await readdir(filePath)
103 return files.length 102 return files.length