From 5cf027bdc46f1bf214c4cf26eee17ebda228004f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 10 Nov 2021 14:34:02 +0100 Subject: Force video updatedAt update on update --- server/tests/api/videos/multiple-servers.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'server/tests/api') diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts index 470bee45b..c6c279064 100644 --- a/server/tests/api/videos/multiple-servers.ts +++ b/server/tests/api/videos/multiple-servers.ts @@ -667,6 +667,26 @@ describe('Test multiple servers', function () { } }) + 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) -- cgit v1.2.3