]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/plugins/plugin-storage.ts
Improve VideoChannelSyncLatestScheduler logs
[github/Chocobozzz/PeerTube.git] / server / tests / plugins / plugin-storage.ts
index 5745914a53b280e920f2ff402513be75ca630838..112652a1fe23d3d4825a2ffbd76ad371f0ca1252 100644 (file)
@@ -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()