mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-10-20 06:37:23 +02:00
fix: rebuild ready snapshots on an explicit refresh (#890)
* fix repository refresh failing to reflect new public GitHub commits * test: cover forced snapshot rebuilds and unchanged background refresh * fix: serialize missing-tree recovery with owner refreshes --------- Co-authored-by: Thomas Durieux <5577568+tdurieux@users.noreply.github.com>
This commit is contained in:
1 parent
bee729e0ee
commit
4a06aa9888
3 files changed
+75
-5
No files matched your search
@@ -389,7 +389,7 @@ const uri = process.env.PERFORMANCE_MONGO_URI;
|
||||
expect(response).to.deep.equal({ "": 1, src: 1 });
|
||||
await File.deleteMany({ repoId: model.repoId, treeGeneration: "active" });
|
||||
let refreshed = false;
|
||||
repo.updateIfNeeded = async ({ force }) => { refreshed = force; };
|
||||
repo.refresh = async () => { refreshed = true; };
|
||||
expect(await repo.isReady()).to.equal(false); expect(refreshed).to.equal(true);
|
||||
} finally { utils.getRepo = getRepo; }
|
||||
});
|
||||
@@ -716,7 +716,7 @@ const uri = process.env.PERFORMANCE_MONGO_URI;
|
||||
expect((await Repo.findById(model._id)).emptyTreeGeneration).to.equal(undefined);
|
||||
await File.deleteMany({ repoId: model.repoId });
|
||||
let refreshed = false;
|
||||
fresh.updateIfNeeded = async () => { refreshed = true; };
|
||||
fresh.refresh = async () => { refreshed = true; };
|
||||
expect(await fresh.isReady()).to.equal(false); expect(refreshed).to.equal(true);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user