aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/plugins/plugin-storage.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/plugins/plugin-storage.ts')
-rw-r--r--server/tests/plugins/plugin-storage.ts17
1 files changed, 4 insertions, 13 deletions
diff --git a/server/tests/plugins/plugin-storage.ts b/server/tests/plugins/plugin-storage.ts
index 4c65463f2..9babfc83e 100644
--- a/server/tests/plugins/plugin-storage.ts
+++ b/server/tests/plugins/plugin-storage.ts
@@ -5,16 +5,7 @@ import { expect } from 'chai'
5import { pathExists, readdir, readFile } from 'fs-extra' 5import { pathExists, readdir, readFile } from 'fs-extra'
6import { join } from 'path' 6import { join } from 'path'
7import { HttpStatusCode } from '@shared/core-utils' 7import { HttpStatusCode } from '@shared/core-utils'
8import { 8import { cleanupTests, flushAndRunServer, makeGetRequest, PluginsCommand, ServerInfo, setAccessTokensToServers } from '@shared/extra-utils'
9 buildServerDirectory,
10 cleanupTests,
11 flushAndRunServer,
12 makeGetRequest,
13 PluginsCommand,
14 ServerInfo,
15 setAccessTokensToServers,
16 waitUntilLog
17} from '@shared/extra-utils'
18 9
19describe('Test plugin storage', function () { 10describe('Test plugin storage', function () {
20 let server: ServerInfo 11 let server: ServerInfo
@@ -31,7 +22,7 @@ describe('Test plugin storage', function () {
31 describe('DB storage', function () { 22 describe('DB storage', function () {
32 23
33 it('Should correctly store a subkey', async function () { 24 it('Should correctly store a subkey', async function () {
34 await waitUntilLog(server, 'superkey stored value is toto') 25 await server.serversCommand.waitUntilLog('superkey stored value is toto')
35 }) 26 })
36 }) 27 })
37 28
@@ -47,12 +38,12 @@ describe('Test plugin storage', function () {
47 } 38 }
48 39
49 before(function () { 40 before(function () {
50 dataPath = buildServerDirectory(server, 'plugins/data') 41 dataPath = server.serversCommand.buildDirectory('plugins/data')
51 pluginDataPath = join(dataPath, 'peertube-plugin-test-six') 42 pluginDataPath = join(dataPath, 'peertube-plugin-test-six')
52 }) 43 })
53 44
54 it('Should have created the directory on install', async function () { 45 it('Should have created the directory on install', async function () {
55 const dataPath = buildServerDirectory(server, 'plugins/data') 46 const dataPath = server.serversCommand.buildDirectory('plugins/data')
56 const pluginDataPath = join(dataPath, 'peertube-plugin-test-six') 47 const pluginDataPath = join(dataPath, 'peertube-plugin-test-six')
57 48
58 expect(await pathExists(dataPath)).to.be.true 49 expect(await pathExists(dataPath)).to.be.true