diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-07 13:38:26 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:17 +0200 |
commit | 9fff08cf83f34339df7ed4ac770e1dee536adf9d (patch) | |
tree | 36eac5147a12ae257a3e8aaeffae37c9aed23d0a /server/tests/cli/update-host.ts | |
parent | 87e2635a50ac2decb1c330e55c2ff7b6d07a85de (diff) | |
download | PeerTube-9fff08cf83f34339df7ed4ac770e1dee536adf9d.tar.gz PeerTube-9fff08cf83f34339df7ed4ac770e1dee536adf9d.tar.zst PeerTube-9fff08cf83f34339df7ed4ac770e1dee536adf9d.zip |
Introduce accounts command
Diffstat (limited to 'server/tests/cli/update-host.ts')
-rw-r--r-- | server/tests/cli/update-host.ts | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/server/tests/cli/update-host.ts b/server/tests/cli/update-host.ts index 1b1a76aef..f6131a99f 100644 --- a/server/tests/cli/update-host.ts +++ b/server/tests/cli/update-host.ts | |||
@@ -1,9 +1,9 @@ | |||
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 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | ||
5 | import { | 4 | import { |
6 | addVideoChannel, | 5 | addVideoChannel, |
6 | addVideoCommentThread, | ||
7 | cleanupTests, | 7 | cleanupTests, |
8 | createUser, | 8 | createUser, |
9 | flushAndRunServer, | 9 | flushAndRunServer, |
@@ -16,12 +16,10 @@ import { | |||
16 | reRunServer, | 16 | reRunServer, |
17 | ServerInfo, | 17 | ServerInfo, |
18 | setAccessTokensToServers, | 18 | setAccessTokensToServers, |
19 | uploadVideo | 19 | uploadVideo, |
20 | } from '../../../shared/extra-utils' | 20 | waitJobs |
21 | import { waitJobs } from '../../../shared/extra-utils/server/jobs' | 21 | } from '@shared/extra-utils' |
22 | import { getAccountsList } from '../../../shared/extra-utils/users/accounts' | 22 | import { VideoDetails } from '@shared/models' |
23 | import { addVideoCommentThread } from '../../../shared/extra-utils/videos/video-comments' | ||
24 | import { VideoDetails } from '../../../shared/models/videos' | ||
25 | 23 | ||
26 | const expect = chai.expect | 24 | const expect = chai.expect |
27 | 25 | ||
@@ -104,10 +102,10 @@ describe('Test update host scripts', function () { | |||
104 | }) | 102 | }) |
105 | 103 | ||
106 | it('Should have updated accounts url', async function () { | 104 | it('Should have updated accounts url', async function () { |
107 | const res = await getAccountsList(server.url) | 105 | const body = await server.accountsCommand.list() |
108 | expect(res.body.total).to.equal(3) | 106 | expect(body.total).to.equal(3) |
109 | 107 | ||
110 | for (const account of res.body.data) { | 108 | for (const account of body.data) { |
111 | const usernameWithDomain = account.name | 109 | const usernameWithDomain = account.name |
112 | const { body } = await makeActivityPubGetRequest(server.url, '/accounts/' + usernameWithDomain) | 110 | const { body } = await makeActivityPubGetRequest(server.url, '/accounts/' + usernameWithDomain) |
113 | 111 | ||