From 9fff08cf83f34339df7ed4ac770e1dee536adf9d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 7 Jul 2021 13:38:26 +0200 Subject: Introduce accounts command --- server/tests/cli/update-host.ts | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'server/tests/cli/update-host.ts') 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 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ import 'mocha' -import * as chai from 'chai' import { addVideoChannel, + addVideoCommentThread, cleanupTests, createUser, flushAndRunServer, @@ -16,12 +16,10 @@ import { reRunServer, ServerInfo, setAccessTokensToServers, - uploadVideo -} from '../../../shared/extra-utils' -import { waitJobs } from '../../../shared/extra-utils/server/jobs' -import { getAccountsList } from '../../../shared/extra-utils/users/accounts' -import { addVideoCommentThread } from '../../../shared/extra-utils/videos/video-comments' -import { VideoDetails } from '../../../shared/models/videos' + uploadVideo, + waitJobs +} from '@shared/extra-utils' +import { VideoDetails } from '@shared/models' const expect = chai.expect @@ -104,10 +102,10 @@ describe('Test update host scripts', function () { }) it('Should have updated accounts url', async function () { - const res = await getAccountsList(server.url) - expect(res.body.total).to.equal(3) + const body = await server.accountsCommand.list() + expect(body.total).to.equal(3) - for (const account of res.body.data) { + for (const account of body.data) { const usernameWithDomain = account.name const { body } = await makeActivityPubGetRequest(server.url, '/accounts/' + usernameWithDomain) -- cgit v1.2.3