mirror of https://github.com/Chocobozzz/PeerTube
Fix videos tests
parent
5960f92395
commit
59651eee56
|
@ -822,7 +822,7 @@ describe('Test multiple servers', function () {
|
||||||
.field('nsfw', 'false')
|
.field('nsfw', 'false')
|
||||||
.field('channelId', '1')
|
.field('channelId', '1')
|
||||||
|
|
||||||
const filePath = join(__dirname, '..', 'api', 'fixtures', 'video_short.webm')
|
const filePath = join(__dirname, '..', '..', 'api', 'fixtures', 'video_short.webm')
|
||||||
|
|
||||||
await req.attach('videofile', filePath)
|
await req.attach('videofile', filePath)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
|
|
|
@ -337,10 +337,10 @@ describe('Test a single server', function () {
|
||||||
it('Should remove the video', async function () {
|
it('Should remove the video', async function () {
|
||||||
await removeVideo(server.url, server.accessToken, videoId)
|
await removeVideo(server.url, server.accessToken, videoId)
|
||||||
|
|
||||||
const files1 = await readdirPromise(join(__dirname, '..', '..', '..', 'test1/videos/'))
|
const files1 = await readdirPromise(join(__dirname, '..', '..', '..', '..', 'test1/videos/'))
|
||||||
expect(files1).to.have.lengthOf(0)
|
expect(files1).to.have.lengthOf(0)
|
||||||
|
|
||||||
const files2 = await readdirPromise(join(__dirname, '..', '..', '..', 'test1/thumbnails/'))
|
const files2 = await readdirPromise(join(__dirname, '..', '..', '..', '..', 'test1/thumbnails/'))
|
||||||
expect(files2).to.have.lengthOf(0)
|
expect(files2).to.have.lengthOf(0)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,8 @@ function getVideoCategories (url: string) {
|
||||||
|
|
||||||
return makeGetRequest({
|
return makeGetRequest({
|
||||||
url,
|
url,
|
||||||
path
|
path,
|
||||||
|
statusCodeExpected: 200
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +33,8 @@ function getVideoLicences (url: string) {
|
||||||
|
|
||||||
return makeGetRequest({
|
return makeGetRequest({
|
||||||
url,
|
url,
|
||||||
path
|
path,
|
||||||
|
statusCodeExpected: 200
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +43,8 @@ function getVideoLanguages (url: string) {
|
||||||
|
|
||||||
return makeGetRequest({
|
return makeGetRequest({
|
||||||
url,
|
url,
|
||||||
path
|
path,
|
||||||
|
statusCodeExpected: 200
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +53,8 @@ function getVideoPrivacies (url: string) {
|
||||||
|
|
||||||
return makeGetRequest({
|
return makeGetRequest({
|
||||||
url,
|
url,
|
||||||
path
|
path,
|
||||||
|
statusCodeExpected: 200
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue