Skip to content

Commit

Permalink
fixup! test: update psm tests for async agoricNamesAccess
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc committed May 3, 2023
1 parent 8d21097 commit 8587aac
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
6 changes: 4 additions & 2 deletions packages/inter-protocol/test/reserve/setup.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import buildManualTimer from '@agoric/zoe/tools/manualTimer.js';
import { E } from '@endo/eventual-send';
import { makeAgoricNamesAccess, makePromiseSpace } from '@agoric/vats';
import { makePromiseSpace } from '@agoric/vats';
import { makeBoard } from '@agoric/vats/src/lib-board.js';
import { makeAgoricNamesAccess } from '@agoric/vats/test/boot-support.js';
import { setupReserve } from '../../src/proposals/econ-behaviors.js';

import {
Expand Down Expand Up @@ -38,7 +39,8 @@ const setupReserveBootstrap = async (t, timer, farZoeKit) => {
// @ts-expect-error could be undefined
produce.chainTimerService.resolve(timer);
produce.zoe.resolve(zoe);
const { agoricNames, agoricNamesAdmin, spaces } = makeAgoricNamesAccess();
const { agoricNames, agoricNamesAdmin, spaces } =
await makeAgoricNamesAccess();
produce.agoricNames.resolve(agoricNames);
produce.agoricNamesAdmin.resolve(agoricNamesAdmin);
produce.feeMintAccess.resolve(feeMintAccessP);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ import { makeCopyBag } from '@agoric/store';
import { unsafeMakeBundleCache } from '@agoric/swingset-vat/tools/bundleTool.js';
import centralSupplyBundle from '@agoric/vats/bundles/bundle-centralSupply.js';
import mintHolderBundle from '@agoric/vats/bundles/bundle-mintHolder.js';
import { makeAgoricNamesAccess, makePromiseSpace } from '@agoric/vats';
import { makePromiseSpace } from '@agoric/vats';
import { makeBoard } from '@agoric/vats/src/lib-board.js';
import { Stable } from '@agoric/vats/src/tokens.js';
import { makeRatio } from '@agoric/zoe/src/contractSupport/index.js';
import buildManualTimer from '@agoric/zoe/tools/manualTimer.js';
import { E, Far } from '@endo/far';
import { deeplyFulfilled } from '@endo/marshal';
import { makeAgoricNamesAccess } from '@agoric/vats/test/boot-support.js';
import { startStakeFactory } from '../../src/proposals/econ-behaviors.js';
import { startEconomicCommittee } from '../../src/proposals/startEconCommittee.js';
import { ManagerKW as KW } from '../../src/stakeFactory/constants.js';
Expand Down Expand Up @@ -130,7 +131,7 @@ export const setupBootstrap = async (t, timer = buildManualTimer(t.log)) => {
produce.chainTimerService.resolve(timer);
produce.zoe.resolve(zoe);

const { agoricNames, spaces } = makeAgoricNamesAccess();
const { agoricNames, spaces } = await makeAgoricNamesAccess();
produce.agoricNames.resolve(agoricNames);

for (const contract of [
Expand Down
5 changes: 3 additions & 2 deletions packages/smart-wallet/test/supports.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from '@agoric/vats/src/core/basic-behaviors.js';
import { setupClientManager } from '@agoric/vats/src/core/chain-behaviors.js';
import '@agoric/vats/src/core/types.js';
import { makeAgoricNamesAccess, makePromiseSpace } from '@agoric/vats';
import { makePromiseSpace } from '@agoric/vats';
import { buildRootObject as boardRoot } from '@agoric/vats/src/vat-board.js';
import { buildRootObject as mintsRoot } from '@agoric/vats/src/vat-mints.js';
import { makeMockChainStorageRoot } from '@agoric/internal/src/storage-test-utils.js';
Expand All @@ -21,6 +21,7 @@ import { E, Far } from '@endo/far';
import { makeScalarBigMapStore } from '@agoric/vat-data';
import { makeFakeBankKit } from '@agoric/vats/tools/bank-utils.js';
import { Fail } from '@agoric/assert';
import { makeAgoricNamesAccess } from '@agoric/vats/test/boot-support.js';

export { ActionType };

Expand Down Expand Up @@ -110,7 +111,7 @@ export const makeMockTestSpace = async log => {
/** @type { BootstrapPowers & { consume: { loadVat: (n: 'mints') => MintsVat, loadCriticalVat: (n: 'mints') => MintsVat }} } */ (
space
);
const { agoricNames, spaces } = makeAgoricNamesAccess();
const { agoricNames, spaces } = await makeAgoricNamesAccess();
produce.agoricNames.resolve(agoricNames);

const { zoe, feeMintAccess } = await setUpZoeForTest();
Expand Down

0 comments on commit 8587aac

Please sign in to comment.