X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fplugins%2Fplugin-storage.ts;h=112652a1fe23d3d4825a2ffbd76ad371f0ca1252;hb=910744fb084499a110d26bf5542abebb8a750b19;hp=5745914a53b280e920f2ff402513be75ca630838;hpb=254d3579f5338f5fd775c17d15cdfc37078bcfb4;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/plugins/plugin-storage.ts b/server/tests/plugins/plugin-storage.ts index 5745914a5..112652a1f 100644 --- a/server/tests/plugins/plugin-storage.ts +++ b/server/tests/plugins/plugin-storage.ts @@ -1,10 +1,8 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { pathExists, readdir, readFile } from 'fs-extra' import { join } from 'path' -import { HttpStatusCode } from '@shared/core-utils' import { cleanupTests, createSingleServer, @@ -12,7 +10,8 @@ import { PeerTubeServer, PluginsCommand, setAccessTokensToServers -} from '@shared/extra-utils' +} from '@shared/server-commands' +import { HttpStatusCode } from '@shared/models' describe('Test plugin storage', function () { let server: PeerTubeServer @@ -27,10 +26,14 @@ describe('Test plugin storage', function () { }) describe('DB storage', function () { - it('Should correctly store a subkey', async function () { await server.servers.waitUntilLog('superkey stored value is toto') }) + + it('Should correctly retrieve an array as array from the storage.', async function () { + await server.servers.waitUntilLog('storedArrayKey isArray is true') + await server.servers.waitUntilLog('storedArrayKey stored value is toto, toto2') + }) }) describe('Disk storage', function () { @@ -63,7 +66,7 @@ describe('Test plugin storage', function () { url: server.url, token: server.accessToken, path: '/plugins/test-six/router/create-file', - statusCodeExpected: HttpStatusCode.OK_200 + expectedStatus: HttpStatusCode.OK_200 }) const content = await getFileContent()