rename function to listByTypePaged

This commit is contained in:
Girish Ramakrishnan
2025-10-07 12:07:27 +02:00
parent 6869380500
commit 68dd1fbedb
4 changed files with 21 additions and 21 deletions
+3 -3
View File
@@ -288,7 +288,7 @@ describe('backup cleaner', function () {
it('succeeds with box backups, keeps latest', async function () {
await cleanupBackups(site);
const results = await backups.getByTypePaged(backups.BACKUP_TYPE_BOX, 1, 1000);
const results = await backups.listByTypePaged(backups.BACKUP_TYPE_BOX, 1, 1000);
expect(results.length).to.equal(1);
expect(results[0].id).to.equal(BACKUP_1_BOX.id);
@@ -300,7 +300,7 @@ describe('backup cleaner', function () {
it('does not remove expired backups if only one left', async function () {
await cleanupBackups(site);
const results = await backups.getByTypePaged(backups.BACKUP_TYPE_BOX, 1, 1000);
const results = await backups.listByTypePaged(backups.BACKUP_TYPE_BOX, 1, 1000);
expect(results[0].id).to.equal(BACKUP_1_BOX.id);
// check that app backups are also still there. backup_1 is still there
@@ -318,7 +318,7 @@ describe('backup cleaner', function () {
await cleanupBackups(site);
let result = await backups.getByTypePaged(backups.BACKUP_TYPE_APP, 1, 1000);
let result = await backups.listByTypePaged(backups.BACKUP_TYPE_APP, 1, 1000);
expect(result.length).to.equal(4);
result = result.sort((r1, r2) => r1.remotePath.localeCompare(r2.remotePath));
expect(result[0].id).to.be(BACKUP_0_APP_0.id); // because app is installed, latest backup is preserved