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.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/server/tests/plugins/plugin-storage.ts b/server/tests/plugins/plugin-storage.ts
index 9babfc83e..30e231439 100644
--- a/server/tests/plugins/plugin-storage.ts
+++ b/server/tests/plugins/plugin-storage.ts
@@ -16,13 +16,13 @@ describe('Test plugin storage', function () {
16 server = await flushAndRunServer(1) 16 server = await flushAndRunServer(1)
17 await setAccessTokensToServers([ server ]) 17 await setAccessTokensToServers([ server ])
18 18
19 await server.pluginsCommand.install({ path: PluginsCommand.getPluginTestPath('-six') }) 19 await server.plugins.install({ path: PluginsCommand.getPluginTestPath('-six') })
20 }) 20 })
21 21
22 describe('DB storage', function () { 22 describe('DB storage', function () {
23 23
24 it('Should correctly store a subkey', async function () { 24 it('Should correctly store a subkey', async function () {
25 await server.serversCommand.waitUntilLog('superkey stored value is toto') 25 await server.servers.waitUntilLog('superkey stored value is toto')
26 }) 26 })
27 }) 27 })
28 28
@@ -38,12 +38,12 @@ describe('Test plugin storage', function () {
38 } 38 }
39 39
40 before(function () { 40 before(function () {
41 dataPath = server.serversCommand.buildDirectory('plugins/data') 41 dataPath = server.servers.buildDirectory('plugins/data')
42 pluginDataPath = join(dataPath, 'peertube-plugin-test-six') 42 pluginDataPath = join(dataPath, 'peertube-plugin-test-six')
43 }) 43 })
44 44
45 it('Should have created the directory on install', async function () { 45 it('Should have created the directory on install', async function () {
46 const dataPath = server.serversCommand.buildDirectory('plugins/data') 46 const dataPath = server.servers.buildDirectory('plugins/data')
47 const pluginDataPath = join(dataPath, 'peertube-plugin-test-six') 47 const pluginDataPath = join(dataPath, 'peertube-plugin-test-six')
48 48
49 expect(await pathExists(dataPath)).to.be.true 49 expect(await pathExists(dataPath)).to.be.true
@@ -64,14 +64,14 @@ describe('Test plugin storage', function () {
64 }) 64 })
65 65
66 it('Should still have the file after an uninstallation', async function () { 66 it('Should still have the file after an uninstallation', async function () {
67 await server.pluginsCommand.uninstall({ npmName: 'peertube-plugin-test-six' }) 67 await server.plugins.uninstall({ npmName: 'peertube-plugin-test-six' })
68 68
69 const content = await getFileContent() 69 const content = await getFileContent()
70 expect(content).to.equal('Prince Ali') 70 expect(content).to.equal('Prince Ali')
71 }) 71 })
72 72
73 it('Should still have the file after the reinstallation', async function () { 73 it('Should still have the file after the reinstallation', async function () {
74 await server.pluginsCommand.install({ path: PluginsCommand.getPluginTestPath('-six') }) 74 await server.plugins.install({ path: PluginsCommand.getPluginTestPath('-six') })
75 75
76 const content = await getFileContent() 76 const content = await getFileContent()
77 expect(content).to.equal('Prince Ali') 77 expect(content).to.equal('Prince Ali')