Skip to content

Commit

Permalink
test: switch vow test to run under xs for metering
Browse files Browse the repository at this point in the history
  • Loading branch information
mhofman authored and michaelfig committed Jun 12, 2024
1 parent bcecf52 commit d7135b2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
9 changes: 6 additions & 3 deletions packages/SwingSet/tools/bootstrap-relay.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,13 @@ export const buildRootObject = () => {
return root;
},

createVat: async ({ name, bundleCapName, vatParameters = {} }) => {
createVat: async (
{ name, bundleCapName, vatParameters = {} },
options = {},
) => {
const bcap = await E(vatAdmin).getNamedBundleCap(bundleCapName);
const options = { vatParameters };
const { adminNode, root } = await E(vatAdmin).createVat(bcap, options);
const vatOptions = { ...options, vatParameters };
const { adminNode, root } = await E(vatAdmin).createVat(bcap, vatOptions);
vatData.set(name, { adminNode, root });
return root;
},
Expand Down
7 changes: 5 additions & 2 deletions packages/boot/test/upgrading/upgrade-vats.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,12 +456,15 @@ test('upgrade vat-vow', async t => {

const { EV } = await makeScenario(t, { bundles });

t.log('create initial version');
t.log('create initial version, metered');
const vatAdmin = await EV.vat('bootstrap').getVatAdmin();
const meter = await EV(vatAdmin).createUnlimitedMeter();
const vowVatConfig = {
name: 'vow',
bundleCapName: 'vow',
};
const vowRoot = await EV.vat('bootstrap').createVat(vowVatConfig);
const vatOptions = { managerType: 'xs-worker', meter };
const vowRoot = await EV.vat('bootstrap').createVat(vowVatConfig, vatOptions);

t.log('test incarnation 0');
/** @type {Record<string, [settlementValue?: unknown, isRejection?: boolean]>} */
Expand Down

0 comments on commit d7135b2

Please sign in to comment.