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 }
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])