aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/plugins/plugin-storage.ts
blob: 356692eb9ff42b457a70fbcb18a719f9211bc371 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */

import 'mocha'
import { getPluginTestPath, installPlugin, setAccessTokensToServers } from '../../../shared/extra-utils'
import { cleanupTests, flushAndRunServer, ServerInfo, waitUntilLog } from '../../../shared/extra-utils/server/servers'

describe('Test plugin storage', function () {
  let server: ServerInfo

  before(async function () {
    this.timeout(30000)

    server = await flushAndRunServer(1)
    await setAccessTokensToServers([ server ])

    await installPlugin({
      url: server.url,
      accessToken: server.accessToken,
      path: getPluginTestPath('-six')
    })
  })

  it('Should correctly store a subkey', async function () {
    await waitUntilLog(server, 'superkey stored value is toto')
  })

  after(async function () {
    await cleanupTests([ server ])
  })
})