Skip to content

Commit

Permalink
fixup! chore(facade): move registerChain to chainHub
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc committed Jun 10, 2024
1 parent b2d9c2a commit e83dd09
Showing 1 changed file with 1 addition and 41 deletions.
42 changes: 1 addition & 41 deletions packages/orchestration/test/facade.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,44 +48,4 @@ test('chain info', async t => {
t.deepEqual(await result.getChainInfo(), mockChainInfo);
});

// XXX what to do with this test now that chainInfos is the caller's responsibility?
test('contract upgrade', async t => {
const { bootstrap, facadeServices } = await commonSetup(t);

const zone = bootstrap.rootZone;

const { zcf } = await setupZCFTest();

// Register once
{
const chainHub = makeChainHub(facadeServices.agoricNames);
makeOrchestrationFacade({
...facadeServices,
storageNode: bootstrap.storage.rootNode,
zcf,
zone,
chainHub,
makeLocalChainAccountKit,
});
chainHub.registerChain('mock', mockChainInfo);

// cannot register again in this incarnation
t.throws(() => chainHub.registerChain('mock', mockChainInfo), {
message: /already registered/,
});
}

// Simulate running again in a new incarnation with the same zone
{
const chainHub = makeChainHub(facadeServices.agoricNames);
makeOrchestrationFacade({
...facadeServices,
storageNode: bootstrap.storage.rootNode,
zcf,
zone,
chainHub,
makeLocalChainAccountKit,
});
chainHub.registerChain('mock', mockChainInfo);
}
});
test.todo('contract upgrade');

0 comments on commit e83dd09

Please sign in to comment.