fix: mark backup snapshots without metadata invalid
This commit is contained in:
@@ -234,6 +234,15 @@ test("backup actions reject snapshots with missing or mismatched metadata", asyn
|
||||
assert.equal(missingMetaPayload.verification.ok, false);
|
||||
assert.equal(missingMetaPayload.verification.message, "snapshot metadata is missing");
|
||||
|
||||
const listAfterMissingMeta = await getBackups(await requestFor("owner@boss.com", "highest_admin"));
|
||||
assert.equal(listAfterMissingMeta.status, 200);
|
||||
const listAfterMissingMetaPayload = await listAfterMissingMeta.json();
|
||||
const missingMetaListedSnapshot = listAfterMissingMetaPayload.snapshots.find(
|
||||
(snapshot: { snapshotId: string }) => snapshot.snapshotId === snapshotId,
|
||||
);
|
||||
assert.equal(missingMetaListedSnapshot.verification.ok, false);
|
||||
assert.equal(missingMetaListedSnapshot.status, "error");
|
||||
|
||||
const missingMetaPreview = await postBackups(
|
||||
await requestFor("owner@boss.com", "highest_admin", {
|
||||
method: "POST",
|
||||
|
||||
Reference in New Issue
Block a user