+ await command.delete({ abuseId })
+ })
+ })
+
+ describe('When trying to manage messages of a remote abuse', function () {
+ let remoteAbuseId: number
+ let anotherServer: PeerTubeServer
+
+ before(async function () {
+ this.timeout(50000)
+
+ anotherServer = await createSingleServer(2)
+ await setAccessTokensToServers([ anotherServer ])
+
+ await doubleFollow(anotherServer, server)
+
+ const server2VideoId = await anotherServer.videos.getId({ uuid: server.store.videoCreated.uuid })
+ await anotherServer.abuses.report({ reason: 'remote server', videoId: server2VideoId })
+
+ await waitJobs([ server, anotherServer ])
+
+ const body = await command.getAdminList({ sort: '-createdAt' })
+ remoteAbuseId = body.data[0].id
+ })
+
+ it('Should fail when listing abuse messages of a remote abuse', async function () {
+ await command.listMessages({ abuseId: remoteAbuseId, expectedStatus: HttpStatusCode.BAD_REQUEST_400 })
+ })
+
+ it('Should fail when creating abuse message of a remote abuse', async function () {
+ await command.addMessage({ abuseId: remoteAbuseId, message: 'message', expectedStatus: HttpStatusCode.BAD_REQUEST_400 })
+ })
+
+ after(async function () {
+ await cleanupTests([ anotherServer ])