X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=server%2Ftests%2Fapi%2Factivitypub%2Fclient.ts;h=c3e4b7f74a26f866d261bbb243a8d1e6c3b878f8;hb=4c7e60bc17ee5830399bac4aa273356903421b4c;hp=0190df04c22e79c7cd4e3a80b070a119f0013ea1;hpb=d23dd9fbfc4d26026352c10f81d2795ceaf2908a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/activitypub/client.ts b/server/tests/api/activitypub/client.ts index 0190df04c..c3e4b7f74 100644 --- a/server/tests/api/activitypub/client.ts +++ b/server/tests/api/activitypub/client.ts @@ -2,22 +2,21 @@ import 'mocha' import * as chai from 'chai' -import { HttpStatusCode } from '@shared/core-utils' import { cleanupTests, + createMultipleServers, doubleFollow, - flushAndRunMultipleServers, makeActivityPubGetRequest, - ServerInfo, + PeerTubeServer, setAccessTokensToServers, setDefaultVideoChannel } from '@shared/extra-utils' -import { VideoPlaylistPrivacy } from '@shared/models' +import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models' const expect = chai.expect describe('Test activitypub', function () { - let servers: ServerInfo[] = [] + let servers: PeerTubeServer[] = [] let video: { id: number, uuid: string, shortUUID: string } let playlist: { id: number, uuid: string, shortUUID: string } @@ -62,18 +61,18 @@ describe('Test activitypub', function () { before(async function () { this.timeout(30000) - servers = await flushAndRunMultipleServers(2) + servers = await createMultipleServers(2) await setAccessTokensToServers(servers) await setDefaultVideoChannel(servers) { - video = await await servers[0].videosCommand.quickUpload({ name: 'video' }) + video = await servers[0].videos.quickUpload({ name: 'video' }) } { - const attributes = { displayName: 'playlist', privacy: VideoPlaylistPrivacy.PUBLIC, videoChannelId: servers[0].videoChannel.id } - playlist = await servers[0].playlistsCommand.create({ attributes }) + const attributes = { displayName: 'playlist', privacy: VideoPlaylistPrivacy.PUBLIC, videoChannelId: servers[0].store.channel.id } + playlist = await servers[0].playlists.create({ attributes }) } await doubleFollow(servers[0], servers[1])