mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Add ability to disable federation
This commit is contained in:
@@ -6,6 +6,8 @@ import {
|
||||
cleanupTests,
|
||||
createMultipleServers,
|
||||
doubleFollow,
|
||||
makeActivityPubGetRequest,
|
||||
makeGetRequest,
|
||||
PeerTubeServer,
|
||||
setAccessTokensToServers,
|
||||
waitJobs
|
||||
@@ -315,6 +317,26 @@ describe('Test follow constraints', function () {
|
||||
})
|
||||
})
|
||||
|
||||
describe('When disabling federation', function () {
|
||||
|
||||
before(async function () {
|
||||
this.timeout(60_000)
|
||||
|
||||
await servers[0].kill()
|
||||
await servers[0].run({ federation: { enabled: false } })
|
||||
})
|
||||
|
||||
it('Should not federate anymore', async function () {
|
||||
const { uuid } = await servers[0].videos.quickUpload({ name: 'non federated video' })
|
||||
await waitJobs(servers)
|
||||
|
||||
await servers[1].videos.get({ id: uuid, expectedStatus: HttpStatusCode.NOT_FOUND_404 })
|
||||
|
||||
await makeActivityPubGetRequest(servers[0].url, '/inbox', HttpStatusCode.NOT_ACCEPTABLE_406)
|
||||
await makeActivityPubGetRequest(servers[0].url, '/outbox', HttpStatusCode.NOT_ACCEPTABLE_406)
|
||||
})
|
||||
})
|
||||
|
||||
after(async function () {
|
||||
await cleanupTests(servers)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user