aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/peertube-runner/live-transcoding.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/peertube-runner/live-transcoding.ts')
-rw-r--r--server/tests/peertube-runner/live-transcoding.ts20
1 files changed, 13 insertions, 7 deletions
diff --git a/server/tests/peertube-runner/live-transcoding.ts b/server/tests/peertube-runner/live-transcoding.ts
index e7ef941c6..c2ca1de96 100644
--- a/server/tests/peertube-runner/live-transcoding.ts
+++ b/server/tests/peertube-runner/live-transcoding.ts
@@ -31,8 +31,8 @@ describe('Test Live transcoding in peertube-runner program', function () {
31 let sqlCommandServer1: SQLCommand 31 let sqlCommandServer1: SQLCommand
32 32
33 function runSuite (options: { 33 function runSuite (options: {
34 objectStorage: boolean 34 objectStorage?: ObjectStorageCommand
35 }) { 35 } = {}) {
36 const { objectStorage } = options 36 const { objectStorage } = options
37 37
38 it('Should enable transcoding without additional resolutions', async function () { 38 it('Should enable transcoding without additional resolutions', async function () {
@@ -117,7 +117,7 @@ describe('Test Live transcoding in peertube-runner program', function () {
117 117
118 for (const file of files) { 118 for (const file of files) {
119 if (objectStorage) { 119 if (objectStorage) {
120 expectStartWith(file.fileUrl, ObjectStorageCommand.getMockPlaylistBaseUrl()) 120 expectStartWith(file.fileUrl, objectStorage.getMockPlaylistBaseUrl())
121 } 121 }
122 122
123 await makeRawRequest({ url: file.fileUrl, expectedStatus: HttpStatusCode.OK_200 }) 123 await makeRawRequest({ url: file.fileUrl, expectedStatus: HttpStatusCode.OK_200 })
@@ -155,24 +155,30 @@ describe('Test Live transcoding in peertube-runner program', function () {
155 await servers[0].config.enableTranscoding(true, false, true) 155 await servers[0].config.enableTranscoding(true, false, true)
156 }) 156 })
157 157
158 runSuite({ objectStorage: false }) 158 runSuite()
159 }) 159 })
160 160
161 describe('With lives on object storage', function () { 161 describe('With lives on object storage', function () {
162 if (areMockObjectStorageTestsDisabled()) return 162 if (areMockObjectStorageTestsDisabled()) return
163 163
164 const objectStorage = new ObjectStorageCommand()
165
164 before(async function () { 166 before(async function () {
165 await ObjectStorageCommand.prepareDefaultMockBuckets() 167 await objectStorage.prepareDefaultMockBuckets()
166 168
167 await servers[0].kill() 169 await servers[0].kill()
168 170
169 await servers[0].run(ObjectStorageCommand.getDefaultMockConfig()) 171 await servers[0].run(objectStorage.getDefaultMockConfig())
170 172
171 // Wait for peertube runner socket reconnection 173 // Wait for peertube runner socket reconnection
172 await wait(1500) 174 await wait(1500)
173 }) 175 })
174 176
175 runSuite({ objectStorage: true }) 177 runSuite({ objectStorage })
178
179 after(async function () {
180 await objectStorage.cleanupMock()
181 })
176 }) 182 })
177 183
178 describe('Check cleanup', function () { 184 describe('Check cleanup', function () {