X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Flive%2Flive.ts;h=4676a840a5c1d5ee7ead6ace4db530bd7b29c104;hb=c4fa01f7c45b66b112ebd08abce744b7c4041feb;hp=2cce1f4485d73360eb480c7af04d74a3e3612dcb;hpb=89d241a79c262b9775c233b73cff080043ebb5e6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/live/live.ts b/server/tests/api/live/live.ts index 2cce1f448..4676a840a 100644 --- a/server/tests/api/live/live.ts +++ b/server/tests/api/live/live.ts @@ -4,20 +4,18 @@ import 'mocha' import * as chai from 'chai' import { join } from 'path' import { ffprobePromise, getVideoStreamFromFile } from '@server/helpers/ffprobe-utils' -import { HttpStatusCode } from '@shared/core-utils' import { checkLiveCleanup, checkLiveSegmentHash, checkResolutionsInMasterPlaylist, cleanupTests, + createMultipleServers, doubleFollow, - flushAndRunMultipleServers, killallServers, LiveCommand, makeRawRequest, - reRunServer, + PeerTubeServer, sendRTMPStream, - ServerInfo, setAccessTokensToServers, setDefaultVideoChannel, stopFfmpeg, @@ -27,18 +25,26 @@ import { waitJobs, waitUntilLivePublishedOnAllServers } from '@shared/extra-utils' -import { LiveVideo, LiveVideoCreate, VideoDetails, VideoPrivacy, VideoState, VideoStreamingPlaylistType } from '@shared/models' +import { + HttpStatusCode, + LiveVideo, + LiveVideoCreate, + VideoDetails, + VideoPrivacy, + VideoState, + VideoStreamingPlaylistType +} from '@shared/models' const expect = chai.expect describe('Test live', function () { - let servers: ServerInfo[] = [] + let servers: PeerTubeServer[] = [] let commands: LiveCommand[] before(async function () { this.timeout(120000) - servers = await flushAndRunMultipleServers(2) + servers = await createMultipleServers(2) // Get the access tokens await setAccessTokensToServers(servers) @@ -571,7 +577,7 @@ describe('Test live', function () { await commands[0].waitUntilSegmentGeneration({ videoUUID: liveVideoReplayId, resolution: 0, segment: 2 }) await killallServers([ servers[0] ]) - await reRunServer(servers[0]) + await servers[0].run() await wait(5000) })