diff options
author | Chocobozzz <me@florianbigard.com> | 2021-11-26 17:36:38 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-11-26 17:36:55 +0100 |
commit | 7137377d097a74087ed062c8071c1aa5c717c7f7 (patch) | |
tree | 346dcba7770792cfcf00c6e45345030735189f2c /server/tests/api | |
parent | ca9bea152a7a62831daddbd56ee3c5dc71282fbe (diff) | |
download | PeerTube-7137377d097a74087ed062c8071c1aa5c717c7f7.tar.gz PeerTube-7137377d097a74087ed062c8071c1aa5c717c7f7.tar.zst PeerTube-7137377d097a74087ed062c8071c1aa5c717c7f7.zip |
Auto update publishedAt in live restream
Diffstat (limited to 'server/tests/api')
-rw-r--r-- | server/tests/api/live/live-permanent.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/server/tests/api/live/live-permanent.ts b/server/tests/api/live/live-permanent.ts index f07d4cfec..c5f942901 100644 --- a/server/tests/api/live/live-permanent.ts +++ b/server/tests/api/live/live-permanent.ts | |||
@@ -101,6 +101,7 @@ describe('Permanent live', function () { | |||
101 | it('Should stream into this permanent live', async function () { | 101 | it('Should stream into this permanent live', async function () { |
102 | this.timeout(120000) | 102 | this.timeout(120000) |
103 | 103 | ||
104 | const beforePublication = new Date() | ||
104 | const ffmpegCommand = await servers[0].live.sendRTMPStreamInVideo({ videoId: videoUUID }) | 105 | const ffmpegCommand = await servers[0].live.sendRTMPStreamInVideo({ videoId: videoUUID }) |
105 | 106 | ||
106 | for (const server of servers) { | 107 | for (const server of servers) { |
@@ -109,6 +110,11 @@ describe('Permanent live', function () { | |||
109 | 110 | ||
110 | await checkVideoState(videoUUID, VideoState.PUBLISHED) | 111 | await checkVideoState(videoUUID, VideoState.PUBLISHED) |
111 | 112 | ||
113 | for (const server of servers) { | ||
114 | const video = await server.videos.get({ id: videoUUID }) | ||
115 | expect(new Date(video.publishedAt)).greaterThan(beforePublication) | ||
116 | } | ||
117 | |||
112 | await stopFfmpeg(ffmpegCommand) | 118 | await stopFfmpeg(ffmpegCommand) |
113 | await servers[0].live.waitUntilWaiting({ videoId: videoUUID }) | 119 | await servers[0].live.waitUntilWaiting({ videoId: videoUUID }) |
114 | 120 | ||