13 setAccessTokensToServers
16 describe('Test CLI wrapper', function () {
17 let server: ServerInfo
18 const cmd = 'node ./dist/server/tools/peertube.js'
20 before(async function () {
24 server = await runServer(1)
25 await setAccessTokensToServers([ server ])
27 await createUser(server.url, server.accessToken, 'user_1', 'super password')
30 it('Should display no selected instance', async function () {
33 const env = getEnvCli(server)
34 const stdout = await execCLI(`${env} ${cmd} --help`)
36 expect(stdout).to.contain('selected')
39 it('Should remember the authentifying material of the user', async function () {
42 const env = getEnvCli(server)
43 await execCLI(`${env} ` + cmd + ` auth add --url ${server.url} -U user_1 -p "super password"`)
46 after(async function () {
49 await execCLI(cmd + ` auth del ${server.url}`)
51 killallServers([ server ])