})
describe('Should manipulate these videos', function () {
- it('Should update the video 3 by asking server 3', async function () {
+ let updatedAtMin: Date
+
+ it('Should update video 3', async function () {
this.timeout(10000)
const attributes = {
previewfile: 'preview.jpg'
}
+ updatedAtMin = new Date()
await servers[2].videos.update({ id: toRemove[0].id, attributes })
await waitJobs(servers)
const videoUpdated = data.find(video => video.name === 'my super video updated')
expect(!!videoUpdated).to.be.true
+ expect(new Date(videoUpdated.updatedAt)).to.be.greaterThan(updatedAtMin)
+
const isLocal = server.url === 'http://localhost:' + servers[2].port
const checkAttributes = {
name: 'my super video updated',
}
})
+ it('Should only update thumbnail and update updatedAt attribute', async function () {
+ this.timeout(10000)
+
+ const attributes = {
+ thumbnailfile: 'thumbnail.jpg'
+ }
+
+ updatedAtMin = new Date()
+ await servers[2].videos.update({ id: toRemove[0].id, attributes })
+
+ await waitJobs(servers)
+
+ for (const server of servers) {
+ const { data } = await server.videos.list()
+
+ const videoUpdated = data.find(video => video.name === 'my super video updated')
+ expect(new Date(videoUpdated.updatedAt)).to.be.greaterThan(updatedAtMin)
+ }
+ })
+
it('Should remove the videos 3 and 3-2 by asking server 3 and correctly delete files', async function () {
this.timeout(30000)
files: [
{
resolution: 720,
- size: 59000
+ size: 61000
},
{
resolution: 480,
- size: 34000
+ size: 40000
},
{
resolution: 360,
- size: 31000
+ size: 32000
},
{
resolution: 240,