From ae2abfd3aed3e75d39a316b49b914d187faa7475 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 7 Jul 2021 10:33:49 +0200 Subject: Introduce plugins command --- server/tests/plugins/plugin-helpers.ts | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'server/tests/plugins/plugin-helpers.ts') diff --git a/server/tests/plugins/plugin-helpers.ts b/server/tests/plugins/plugin-helpers.ts index 0296d6eb7..0e0f61638 100644 --- a/server/tests/plugins/plugin-helpers.ts +++ b/server/tests/plugins/plugin-helpers.ts @@ -1,23 +1,25 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ import 'mocha' +import { expect } from 'chai' +import { HttpStatusCode } from '@shared/core-utils' import { checkVideoFilesWereRemoved, + cleanupTests, doubleFollow, - getPluginTestPath, + flushAndRunMultipleServers, getVideo, - installPlugin, + getVideosList, + makeGetRequest, makePostBodyRequest, + PluginsCommand, + ServerInfo, setAccessTokensToServers, uploadVideoAndGetId, viewVideo, - getVideosList, waitJobs, - makeGetRequest -} from '../../../shared/extra-utils' -import { cleanupTests, flushAndRunMultipleServers, ServerInfo, waitUntilLog } from '../../../shared/extra-utils/server/servers' -import { expect } from 'chai' -import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' + waitUntilLog +} from '@shared/extra-utils' function postCommand (server: ServerInfo, command: string, bodyArg?: object) { const body = { command } @@ -42,11 +44,7 @@ describe('Test plugin helpers', function () { await doubleFollow(servers[0], servers[1]) - await installPlugin({ - url: servers[0].url, - accessToken: servers[0].accessToken, - path: getPluginTestPath('-four') - }) + await servers[0].pluginsCommand.install({ path: PluginsCommand.getPluginTestPath('-four') }) }) describe('Logger', function () { -- cgit v1.2.3