Skip to content

Commit

Permalink
test: extract commonPrivateArgs
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Jun 5, 2024
1 parent 75bb7df commit 72bf1bf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
9 changes: 2 additions & 7 deletions packages/orchestration/test/examples/swapExample.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ test('start', async t => {
const {
bootstrap,
brands: { ist },
commonPrivateArgs,
utils,
} = await commonSetup(t);

Expand All @@ -27,13 +28,7 @@ test('start', async t => {
installation,
{ Stable: ist.issuer },
{},
{
agoricNames: bootstrap.agoricNames,
localchain: bootstrap.localchain,
orchestrationService: bootstrap.orchestration,
storageNode: bootstrap.storage.rootNode,
timerService: bootstrap.timer,
},
commonPrivateArgs,
);

const inv = E(publicFacet).makeSwapAndStakeInvitation();
Expand Down
10 changes: 2 additions & 8 deletions packages/orchestration/test/examples/unbondExample.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ type StartFn =

test('start', async t => {
const {
bootstrap,
brands: { ist },
commonPrivateArgs,
} = await commonSetup(t);

const { zoe, bundleAndInstall } = await setUpZoeForTest();
Expand All @@ -25,13 +25,7 @@ test('start', async t => {
installation,
{ Stable: ist.issuer },
{},
{
agoricNames: bootstrap.agoricNames,
localchain: bootstrap.localchain,
orchestrationService: bootstrap.orchestration,
storageNode: bootstrap.storage.rootNode,
timerService: bootstrap.timer,
},
commonPrivateArgs,
);

const inv = E(publicFacet).makeUnbondAndLiquidStakeInvitation();
Expand Down
7 changes: 7 additions & 0 deletions packages/orchestration/test/supports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ export const commonSetup = async t => {
bld,
ist,
},
commonPrivateArgs: {
agoricNames,
localchain,
orchestrationService: orchestration,
storageNode: storage.rootNode,
timerService: timer,
},
utils: {
pourPayment,
},
Expand Down

0 comments on commit 72bf1bf

Please sign in to comment.