t
This commit is contained in:
parent
4c4e767ec6
commit
9d70afb4cc
42 changed files with 1266 additions and 630 deletions
|
|
@ -37,5 +37,6 @@ const world=revision=>({revision,rowRevision:revision,boardVersions:{},changes:[
|
|||
assert.equal(JSON.parse(fs.readFileSync(worldFile,'utf8')).revision,1);
|
||||
assert.equal(JSON.parse(fs.readFileSync(playerFile,'utf8')).earnedScore,100);
|
||||
assert.equal(fs.existsSync(commitFile),false);
|
||||
const poisoned=JSON.parse(fs.readFileSync(worldFile,'utf8'));poisoned.global.worldGeneration='foreign-generation';fs.writeFileSync(worldFile,JSON.stringify(poisoned));fs.writeFileSync(path.join(boardsDir,'B9.99.json'),'{}');assert.equal(await server.collectRetiredBoardVersions(),0);assert.equal(fs.existsSync(path.join(boardsDir,'B9.99.json')),true,'Generation mismatch cleanup deleted an unreferenced shard');
|
||||
console.log('Shared-world commit recovery and retired-version collection passed');
|
||||
})().finally(()=>fs.rmSync(dataRoot,{recursive:true,force:true})).catch(error=>{console.error(error);process.exitCode=1});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue