Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion test/integration/api/admin/api_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1043,6 +1043,7 @@ describe("api", function () {

it('should restore different versions of a deleted asset', async function () {
this.timeout(TIMEOUT.LARGE);

// Upload the same file twice (upload->delete->upload->delete)

// Upload and delete a file
Expand All @@ -1057,7 +1058,7 @@ describe("api", function () {
await wait(1000)();

const secondDelete = await API_V2.delete_resources([PUBLIC_ID_BACKUP_1]);

await wait(1000)();

// Sanity, ensure these uploads are different before we continue
expect(firstUpload.bytes).not.to.equal(secondUpload.bytes);
Expand All @@ -1082,6 +1083,7 @@ describe("api", function () {
expect(firstVerRestore[PUBLIC_ID_BACKUP_1].bytes).to.eql(firstUpload.bytes);

// Restore second version, ensure it's equal to the upload size
await wait(1000)();
const secondVerRestore = await API_V2.restore([PUBLIC_ID_BACKUP_1], { versions: [secondAssetVersion] });
expect(secondVerRestore[PUBLIC_ID_BACKUP_1].bytes).to.eql(secondUpload.bytes);

Expand Down