archives: add eventlog

This commit is contained in:
Girish Ramakrishnan
2024-12-10 11:01:10 +01:00
parent 490840b71d
commit f973536f7f
9 changed files with 34 additions and 13 deletions
+4 -4
View File
@@ -40,12 +40,12 @@ describe('Archives', function () {
let archiveId;
it('cannot add bad backup to archives', async function () {
const [error] = await safe(archives.add('badId', { appConfig }));
const [error] = await safe(archives.add('badId', { appConfig }, auditSource));
expect(error.reason).to.be(BoxError.NOT_FOUND);
});
it('can add good backup to archives', async function () {
archiveId = await archives.add(appBackup.id, { appConfig });
archiveId = await archives.add(appBackup.id, { appConfig }, auditSource);
});
it('cannot get invalid archive', async function () {
@@ -72,12 +72,12 @@ describe('Archives', function () {
});
it('cannot delete bad archive', async function () {
const [error] = await safe(archives.del('badId', auditSource));
const [error] = await safe(archives.del({ id: 'badId' }, auditSource));
expect(error.reason).to.be(BoxError.NOT_FOUND);
});
it('can del valid archive', async function () {
await archives.del(archiveId, auditSource);
await archives.del({ id: archiveId }, auditSource);
const result = await archives.list(1, 10);
expect(result.length).to.be(0);
});