+ await checkFilesCleanup({ server: servers[0], videoUUID: videoUUIDPermanent, resolutions, objectStorage })
+ })
+ })
+ })
+
+ describe('With object storage base url', function () {
+ const mockObjectStorageProxy = new MockObjectStorageProxy()
+ let baseMockUrl: string
+
+ before(async function () {
+ this.timeout(120000)
+
+ const port = await mockObjectStorageProxy.initialize()
+ const bucketName = objectStorage.getMockStreamingPlaylistsBucketName()
+ baseMockUrl = `http://127.0.0.1:${port}/${bucketName}`
+
+ await objectStorage.prepareDefaultMockBuckets()
+
+ const config = {
+ object_storage: {
+ enabled: true,
+ endpoint: 'http://' + ObjectStorageCommand.getMockEndpointHost(),
+ region: ObjectStorageCommand.getMockRegion(),
+
+ credentials: ObjectStorageCommand.getMockCredentialsConfig(),
+
+ streaming_playlists: {
+ bucket_name: bucketName,
+ prefix: '',
+ base_url: baseMockUrl
+ }
+ }
+ }
+
+ await servers[0].kill()
+ await servers[0].run(config)
+
+ await servers[0].config.enableLive({ transcoding: true, resolutions: 'min' })
+ })
+
+ it('Should publish a live and replace the base url', async function () {
+ this.timeout(240000)
+
+ const videoUUIDPermanent = await createLive(servers[0], true)
+
+ const ffmpegCommand = await servers[0].live.sendRTMPStreamInVideo({ videoId: videoUUIDPermanent })
+ await waitUntilLivePublishedOnAllServers(servers, videoUUIDPermanent)
+
+ await testLiveVideoResolutions({
+ originServer: servers[0],
+ sqlCommand: sqlCommandServer1,
+ servers,
+ liveVideoId: videoUUIDPermanent,
+ resolutions: [ 720 ],
+ transcoded: true,
+ objectStorage,
+ objectStorageBaseUrl: baseMockUrl