Skip to content

Commit

Permalink
test(boot): use a single bundle directory for all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Jun 17, 2024
1 parent 7b30169 commit 5f3c1d1
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 44 deletions.
8 changes: 3 additions & 5 deletions packages/boot/test/bootstrapTests/demo-config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ import { keyArrayEqual, makeSwingsetTestKit } from '../../tools/supports.ts';
const { keys } = Object;

const makeDefaultTestContext = async t => {
const swingsetTestKit = await makeSwingsetTestKit(
t.log,
'bundles/demo-config',
{ configSpecifier: '@agoric/vm-config/decentral-demo-config.json' },
);
const swingsetTestKit = await makeSwingsetTestKit(t.log, undefined, {
configSpecifier: '@agoric/vm-config/decentral-demo-config.json',
});
return swingsetTestKit;
};
type DefaultTestContext = Awaited<ReturnType<typeof makeDefaultTestContext>>;
Expand Down
2 changes: 1 addition & 1 deletion packages/boot/test/bootstrapTests/net-ibc-upgrade.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const makeTestContext = async t => {
}) as Baggage;
const zone = makeDurableZone(baggage);

const bundleDir = 'bundles/net-ibc-upgrade';
const bundleDir = 'bundles';
const bundleCache = await makeNodeBundleCache(
bundleDir,
{ cacheSourceMaps: false },
Expand Down
10 changes: 3 additions & 7 deletions packages/boot/test/bootstrapTests/vats-restart.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,9 @@ const PLATFORM_CONFIG = '@agoric/vm-config/decentral-itest-vaults-config.json';

export const makeTestContext = async t => {
console.time('DefaultTestContext');
const swingsetTestKit = await makeSwingsetTestKit(
t.log,
'bundles/vats-restart',
{
configSpecifier: PLATFORM_CONFIG,
},
);
const swingsetTestKit = await makeSwingsetTestKit(t.log, undefined, {
configSpecifier: PLATFORM_CONFIG,
});

const { runUtils, storage } = swingsetTestKit;
console.timeLog('DefaultTestContext', 'swingsetTestKit');
Expand Down
5 changes: 1 addition & 4 deletions packages/boot/test/bootstrapTests/vaults-integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ const likePayouts = (collateral, minted) => ({

const makeDefaultTestContext = async t => {
console.time('DefaultTestContext');
const swingsetTestKit = await makeSwingsetTestKit(
t.log,
'bundles/vaults-integration',
);
const swingsetTestKit = await makeSwingsetTestKit(t.log);

const { runUtils, storage } = swingsetTestKit;
console.timeLog('DefaultTestContext', 'swingsetTestKit');
Expand Down
10 changes: 3 additions & 7 deletions packages/boot/test/bootstrapTests/vaults-upgrade.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,9 @@ const makeDefaultTestContext = async (
} = {},
) => {
logTiming && console.time('DefaultTestContext');
const swingsetTestKit = await makeSwingsetTestKit(
t.log,
'bundles/vaults-upgrade',
{
storage,
},
);
const swingsetTestKit = await makeSwingsetTestKit(t.log, undefined, {
storage,
});

const { readLatest, runUtils } = swingsetTestKit;
({ storage } = swingsetTestKit);
Expand Down
8 changes: 3 additions & 5 deletions packages/boot/test/bootstrapTests/vtransfer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ import { BridgeId, VTRANSFER_IBC_EVENT } from '@agoric/internal';
import { makeSwingsetTestKit } from '../../tools/supports.ts';

const makeDefaultTestContext = async t => {
const swingsetTestKit = await makeSwingsetTestKit(
t.log,
'bundles/vtransfer',
{ configSpecifier: '@agoric/vm-config/decentral-demo-config.json' },
);
const swingsetTestKit = await makeSwingsetTestKit(t.log, undefined, {
configSpecifier: '@agoric/vm-config/decentral-demo-config.json',
});
return swingsetTestKit;
};
type DefaultTestContext = Awaited<ReturnType<typeof makeDefaultTestContext>>;
Expand Down
10 changes: 3 additions & 7 deletions packages/boot/test/bootstrapTests/walletFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,9 @@ export const makeWalletFactoryContext = async (
t,
configSpecifier = '@agoric/vm-config/decentral-main-vaults-config.json',
) => {
const swingsetTestKit = await makeSwingsetTestKit(
t.log,
'bundles/walletFactory',
{
configSpecifier,
},
);
const swingsetTestKit = await makeSwingsetTestKit(t.log, undefined, {
configSpecifier,
});

const { runUtils, storage } = swingsetTestKit;
console.timeLog('DefaultTestContext', 'swingsetTestKit');
Expand Down
10 changes: 3 additions & 7 deletions packages/boot/test/bootstrapTests/zcf-upgrade.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,9 @@ const ZCF_PROBE_SRC = './zcfProbe.js';

export const makeZoeTestContext = async t => {
console.time('ZoeTestContext');
const swingsetTestKit = await makeSwingsetTestKit(
t.log,
'bundles/zcf-upgrade',
{
configSpecifier: '@agoric/vm-config/decentral-demo-config.json',
},
);
const swingsetTestKit = await makeSwingsetTestKit(t.log, undefined, {
configSpecifier: '@agoric/vm-config/decentral-demo-config.json',
});

const { runUtils } = swingsetTestKit;
console.timeLog('DefaultTestContext', 'swingsetTestKit');
Expand Down
2 changes: 1 addition & 1 deletion packages/boot/tools/liquidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ export const makeLiquidationTestKit = async ({
};

export const makeLiquidationTestContext = async t => {
const swingsetTestKit = await makeSwingsetTestKit(t.log, 'bundles/vaults');
const swingsetTestKit = await makeSwingsetTestKit(t.log);
console.time('DefaultTestContext');

const { runUtils, storage } = swingsetTestKit;
Expand Down

0 comments on commit 5f3c1d1

Please sign in to comment.