PeerTube/packages/tests/src/api/server/no-client.ts

25 lines
675 B
TypeScript
Raw Normal View History

2021-08-27 14:32:44 +02:00
import request from 'supertest'
import { HttpStatusCode } from '@peertube/peertube-models'
import { cleanupTests, createSingleServer, PeerTubeServer } from '@peertube/peertube-server-commands'
2018-11-14 15:27:47 +01:00
describe('Start and stop server without web client routes', function () {
2021-07-16 09:47:51 +02:00
let server: PeerTubeServer
2018-11-14 15:27:47 +01:00
before(async function () {
this.timeout(30000)
2021-07-22 12:07:26 +02:00
server = await createSingleServer(1, {}, { peertubeArgs: [ '--no-client' ] })
2018-11-14 15:27:47 +01:00
})
it('Should fail getting the client', function () {
const req = request(server.url)
.get('/')
return req.expect(HttpStatusCode.NOT_FOUND_404)
2018-11-14 15:27:47 +01:00
})
2019-04-24 15:10:37 +02:00
after(async function () {
await cleanupTests([ server ])
2018-11-14 15:27:47 +01:00
})
})