aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/cli/peertube.ts9
-rw-r--r--server/tests/cli/update-host.ts3
2 files changed, 10 insertions, 2 deletions
diff --git a/server/tests/cli/peertube.ts b/server/tests/cli/peertube.ts
index ef7ab5bd5..5ab07edb0 100644
--- a/server/tests/cli/peertube.ts
+++ b/server/tests/cli/peertube.ts
@@ -12,6 +12,7 @@ import {
12 doubleFollow, 12 doubleFollow,
13 flushAndRunServer, 13 flushAndRunServer,
14 getLocalIdByUUID, 14 getLocalIdByUUID,
15 getMyUserInformation,
15 getVideo, 16 getVideo,
16 getVideosList, 17 getVideosList,
17 ImportsCommand, 18 ImportsCommand,
@@ -52,6 +53,14 @@ describe('Test CLI wrapper', function () {
52 53
53 describe('Authentication and instance selection', function () { 54 describe('Authentication and instance selection', function () {
54 55
56 it('Should get an access token', async function () {
57 const stdout = await cliCommand.execWithEnv(`${cmd} token --url ${server.url} --username user_1 --password super_password`)
58 const token = stdout.trim()
59
60 const res = await getMyUserInformation(server.url, token)
61 expect(res.body.username).to.equal('user_1')
62 })
63
55 it('Should display no selected instance', async function () { 64 it('Should display no selected instance', async function () {
56 this.timeout(60000) 65 this.timeout(60000)
57 66
diff --git a/server/tests/cli/update-host.ts b/server/tests/cli/update-host.ts
index 61a6c403a..d3a1520cf 100644
--- a/server/tests/cli/update-host.ts
+++ b/server/tests/cli/update-host.ts
@@ -1,6 +1,7 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2 2
3import 'mocha' 3import 'mocha'
4import { expect } from 'chai'
4import { 5import {
5 cleanupTests, 6 cleanupTests,
6 createUser, 7 createUser,
@@ -18,8 +19,6 @@ import {
18} from '@shared/extra-utils' 19} from '@shared/extra-utils'
19import { VideoDetails } from '@shared/models' 20import { VideoDetails } from '@shared/models'
20 21
21const expect = chai.expect
22
23describe('Test update host scripts', function () { 22describe('Test update host scripts', function () {
24 let server: ServerInfo 23 let server: ServerInfo
25 24