From 6403a6bd019a30848f0e9b5f6e7b9734229ab0f1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 19 May 2023 13:33:27 +0200 Subject: peertube runner tests in parallel --- server/tests/peertube-runner/client-cli.ts | 5 ++--- server/tests/peertube-runner/live-transcoding.ts | 8 ++++---- server/tests/peertube-runner/studio-transcoding.ts | 6 +++--- server/tests/peertube-runner/vod-transcoding.ts | 6 +++--- 4 files changed, 12 insertions(+), 13 deletions(-) (limited to 'server/tests/peertube-runner') diff --git a/server/tests/peertube-runner/client-cli.ts b/server/tests/peertube-runner/client-cli.ts index ff70e599f..cc8136c4a 100644 --- a/server/tests/peertube-runner/client-cli.ts +++ b/server/tests/peertube-runner/client-cli.ts @@ -18,7 +18,7 @@ describe('Test peertube-runner program client CLI', function () { await server.config.enableRemoteTranscoding() - peertubeRunner = new PeerTubeRunnerProcess() + peertubeRunner = new PeerTubeRunnerProcess(server) await peertubeRunner.runServer() }) @@ -32,7 +32,6 @@ describe('Test peertube-runner program client CLI', function () { const registrationToken = await server.runnerRegistrationTokens.getFirstRegistrationToken() await peertubeRunner.registerPeerTubeInstance({ - server, registrationToken, runnerName: 'my super runner', runnerDescription: 'super description' @@ -54,7 +53,7 @@ describe('Test peertube-runner program client CLI', function () { }) it('Should unregister the PeerTube instance', async function () { - await peertubeRunner.unregisterPeerTubeInstance({ server }) + await peertubeRunner.unregisterPeerTubeInstance() }) it('Should not have PeerTube instance listed', async function () { diff --git a/server/tests/peertube-runner/live-transcoding.ts b/server/tests/peertube-runner/live-transcoding.ts index 13a4cb4e9..c56f4cd84 100644 --- a/server/tests/peertube-runner/live-transcoding.ts +++ b/server/tests/peertube-runner/live-transcoding.ts @@ -1,5 +1,5 @@ -import { expect } from 'chai' /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ +import { expect } from 'chai' import { checkPeerTubeRunnerCacheIsEmpty, expectStartWith, @@ -144,9 +144,9 @@ describe('Test Live transcoding in peertube-runner program', function () { const registrationToken = await servers[0].runnerRegistrationTokens.getFirstRegistrationToken() - peertubeRunner = new PeerTubeRunnerProcess() + peertubeRunner = new PeerTubeRunnerProcess(servers[0]) await peertubeRunner.runServer() - await peertubeRunner.registerPeerTubeInstance({ server: servers[0], registrationToken, runnerName: 'runner' }) + await peertubeRunner.registerPeerTubeInstance({ registrationToken, runnerName: 'runner' }) }) describe('With lives on local filesystem storage', function () { @@ -184,7 +184,7 @@ describe('Test Live transcoding in peertube-runner program', function () { after(async function () { if (peertubeRunner) { - await peertubeRunner.unregisterPeerTubeInstance({ server: servers[0] }) + await peertubeRunner.unregisterPeerTubeInstance() peertubeRunner.kill() } diff --git a/server/tests/peertube-runner/studio-transcoding.ts b/server/tests/peertube-runner/studio-transcoding.ts index e20cc9041..f60b83dbd 100644 --- a/server/tests/peertube-runner/studio-transcoding.ts +++ b/server/tests/peertube-runner/studio-transcoding.ts @@ -74,9 +74,9 @@ describe('Test studio transcoding in peertube-runner program', function () { const registrationToken = await servers[0].runnerRegistrationTokens.getFirstRegistrationToken() - peertubeRunner = new PeerTubeRunnerProcess() + peertubeRunner = new PeerTubeRunnerProcess(servers[0]) await peertubeRunner.runServer() - await peertubeRunner.registerPeerTubeInstance({ server: servers[0], registrationToken, runnerName: 'runner' }) + await peertubeRunner.registerPeerTubeInstance({ registrationToken, runnerName: 'runner' }) }) describe('With videos on local filesystem storage', function () { @@ -109,7 +109,7 @@ describe('Test studio transcoding in peertube-runner program', function () { after(async function () { if (peertubeRunner) { - await peertubeRunner.unregisterPeerTubeInstance({ server: servers[0] }) + await peertubeRunner.unregisterPeerTubeInstance() peertubeRunner.kill() } diff --git a/server/tests/peertube-runner/vod-transcoding.ts b/server/tests/peertube-runner/vod-transcoding.ts index d7e2df095..02d839339 100644 --- a/server/tests/peertube-runner/vod-transcoding.ts +++ b/server/tests/peertube-runner/vod-transcoding.ts @@ -249,9 +249,9 @@ describe('Test VOD transcoding in peertube-runner program', function () { const registrationToken = await servers[0].runnerRegistrationTokens.getFirstRegistrationToken() - peertubeRunner = new PeerTubeRunnerProcess() + peertubeRunner = new PeerTubeRunnerProcess(servers[0]) await peertubeRunner.runServer() - await peertubeRunner.registerPeerTubeInstance({ server: servers[0], registrationToken, runnerName: 'runner' }) + await peertubeRunner.registerPeerTubeInstance({ registrationToken, runnerName: 'runner' }) }) describe('With videos on local filesystem storage', function () { @@ -335,7 +335,7 @@ describe('Test VOD transcoding in peertube-runner program', function () { after(async function () { if (peertubeRunner) { - await peertubeRunner.unregisterPeerTubeInstance({ server: servers[0] }) + await peertubeRunner.unregisterPeerTubeInstance() peertubeRunner.kill() } -- cgit v1.2.3