aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/cli/prune-storage.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-24 15:22:56 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-11-25 10:07:51 +0100
commitca5c612bfdd225433bcc6ace01c8024df3f674ba (patch)
tree1b722cc346c9079c65338f0792ce7bcd2a20f8a0 /server/tests/cli/prune-storage.ts
parent5a547f69d5dc5867e253f7721513479c754b4f15 (diff)
downloadPeerTube-ca5c612bfdd225433bcc6ace01c8024df3f674ba.tar.gz
PeerTube-ca5c612bfdd225433bcc6ace01c8024df3f674ba.tar.zst
PeerTube-ca5c612bfdd225433bcc6ace01c8024df3f674ba.zip
Add live transcoding bit rate tests
Diffstat (limited to 'server/tests/cli/prune-storage.ts')
-rw-r--r--server/tests/cli/prune-storage.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/server/tests/cli/prune-storage.ts b/server/tests/cli/prune-storage.ts
index 6cda80070..052a5f91e 100644
--- a/server/tests/cli/prune-storage.ts
+++ b/server/tests/cli/prune-storage.ts
@@ -28,13 +28,13 @@ import { join } from 'path'
28const expect = chai.expect 28const expect = chai.expect
29 29
30async function countFiles (internalServerNumber: number, directory: string) { 30async function countFiles (internalServerNumber: number, directory: string) {
31 const files = await readdir(buildServerDirectory(internalServerNumber, directory)) 31 const files = await readdir(buildServerDirectory({ internalServerNumber }, directory))
32 32
33 return files.length 33 return files.length
34} 34}
35 35
36async function assertNotExists (internalServerNumber: number, directory: string, substring: string) { 36async function assertNotExists (internalServerNumber: number, directory: string, substring: string) {
37 const files = await readdir(buildServerDirectory(internalServerNumber, directory)) 37 const files = await readdir(buildServerDirectory({ internalServerNumber }, directory))
38 38
39 for (const f of files) { 39 for (const f of files) {
40 expect(f).to.not.contain(substring) 40 expect(f).to.not.contain(substring)
@@ -124,7 +124,7 @@ describe('Test prune storage scripts', function () {
124 it('Should create some dirty files', async function () { 124 it('Should create some dirty files', async function () {
125 for (let i = 0; i < 2; i++) { 125 for (let i = 0; i < 2; i++) {
126 { 126 {
127 const base = buildServerDirectory(servers[0].internalServerNumber, 'videos') 127 const base = buildServerDirectory(servers[0], 'videos')
128 128
129 const n1 = uuidv4() + '.mp4' 129 const n1 = uuidv4() + '.mp4'
130 const n2 = uuidv4() + '.webm' 130 const n2 = uuidv4() + '.webm'
@@ -136,7 +136,7 @@ describe('Test prune storage scripts', function () {
136 } 136 }
137 137
138 { 138 {
139 const base = buildServerDirectory(servers[0].internalServerNumber, 'torrents') 139 const base = buildServerDirectory(servers[0], 'torrents')
140 140
141 const n1 = uuidv4() + '-240.torrent' 141 const n1 = uuidv4() + '-240.torrent'
142 const n2 = uuidv4() + '-480.torrent' 142 const n2 = uuidv4() + '-480.torrent'
@@ -148,7 +148,7 @@ describe('Test prune storage scripts', function () {
148 } 148 }
149 149
150 { 150 {
151 const base = buildServerDirectory(servers[0].internalServerNumber, 'thumbnails') 151 const base = buildServerDirectory(servers[0], 'thumbnails')
152 152
153 const n1 = uuidv4() + '.jpg' 153 const n1 = uuidv4() + '.jpg'
154 const n2 = uuidv4() + '.jpg' 154 const n2 = uuidv4() + '.jpg'
@@ -160,7 +160,7 @@ describe('Test prune storage scripts', function () {
160 } 160 }
161 161
162 { 162 {
163 const base = buildServerDirectory(servers[0].internalServerNumber, 'previews') 163 const base = buildServerDirectory(servers[0], 'previews')
164 164
165 const n1 = uuidv4() + '.jpg' 165 const n1 = uuidv4() + '.jpg'
166 const n2 = uuidv4() + '.jpg' 166 const n2 = uuidv4() + '.jpg'
@@ -172,7 +172,7 @@ describe('Test prune storage scripts', function () {
172 } 172 }
173 173
174 { 174 {
175 const base = buildServerDirectory(servers[0].internalServerNumber, 'avatars') 175 const base = buildServerDirectory(servers[0], 'avatars')
176 176
177 const n1 = uuidv4() + '.png' 177 const n1 = uuidv4() + '.png'
178 const n2 = uuidv4() + '.jpg' 178 const n2 = uuidv4() + '.jpg'