Guard stale app execution against feature contract changes
This commit is contained in:
@@ -54,3 +54,10 @@ test('missing current app uses verified same-contract N-1 offline through the co
|
||||
test('an incompatible previous core never executes against the new shell',async()=>{
|
||||
const f=fixture({previous:true,contract:2});await assert.rejects(f.root.AppBootstrap.ready,/hash/);assert.equal(f.root.appRuns,undefined);
|
||||
});
|
||||
|
||||
|
||||
test('a feature contract change also prevents stale core execution',async()=>{
|
||||
const f=fixture({previous:true});f.root.Lazy.manifest.groups['feature:test']={contract:2,files:[]};
|
||||
const state=await f.held.get('/__ytp_asset_state').json();state.previous.groups['feature:test']={contract:1,files:[]};f.held.set('/__ytp_asset_state',Response.json(state));
|
||||
await assert.rejects(f.root.AppBootstrap.ready,/hash/);assert.equal(f.root.appRuns,undefined);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user