1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Prevent object storage mock conflicts

When running tests in parallel
This commit is contained in:
Chocobozzz 2023-05-23 10:49:45 +02:00
parent 41cde76bbf
commit f89189907b
No known key found for this signature in database
GPG key ID: 583A612D890159BE
20 changed files with 277 additions and 201 deletions

View file

@ -326,11 +326,13 @@ describe('Test video studio', function () {
describe('Object storage studio edition', function () {
if (areMockObjectStorageTestsDisabled()) return
const objectStorage = new ObjectStorageCommand()
before(async function () {
await ObjectStorageCommand.prepareDefaultMockBuckets()
await objectStorage.prepareDefaultMockBuckets()
await servers[0].kill()
await servers[0].run(ObjectStorageCommand.getDefaultMockConfig())
await servers[0].run(objectStorage.getDefaultMockConfig())
await servers[0].config.enableMinimumTranscoding()
})
@ -353,16 +355,20 @@ describe('Test video studio', function () {
}
for (const webtorrentFile of video.files) {
expectStartWith(webtorrentFile.fileUrl, ObjectStorageCommand.getMockWebTorrentBaseUrl())
expectStartWith(webtorrentFile.fileUrl, objectStorage.getMockWebVideosBaseUrl())
}
for (const hlsFile of video.streamingPlaylists[0].files) {
expectStartWith(hlsFile.fileUrl, ObjectStorageCommand.getMockPlaylistBaseUrl())
expectStartWith(hlsFile.fileUrl, objectStorage.getMockPlaylistBaseUrl())
}
await checkVideoDuration(server, videoUUID, 9)
}
})
after(async function () {
await objectStorage.cleanupMock()
})
})
after(async function () {