+ await killallServers([ server ])
+
+ await server.run({ history: { videos: { max_age: '10 days' } } })
+
+ await wait(6000)
+
+ // Should still have history
+
+ const body = await command.list()
+ expect(body.total).to.equal(2)
+ })
+
+ it('Should clean old history', async function () {
+ this.timeout(50000)
+
+ await killallServers([ server ])
+
+ await server.run({ history: { videos: { max_age: '5 seconds' } } })
+
+ await wait(6000)
+
+ const body = await command.list()
+ expect(body.total).to.equal(0)
+ })
+
+ after(async function () {
+ await cleanupTests([ server ])