From 991a7fe8d7cebb510d576f6eeaac7705244fb00b Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Sun, 10 Dec 2023 17:02:24 -0600 Subject: [PATCH] fixup! chore(test-terminate): WIP WIP WIP --- .../test/unitTests/contracts/gimix/test-terminate.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/zoe/test/unitTests/contracts/gimix/test-terminate.ts b/packages/zoe/test/unitTests/contracts/gimix/test-terminate.ts index d0515ad4b03..46d6379ccce 100644 --- a/packages/zoe/test/unitTests/contracts/gimix/test-terminate.ts +++ b/packages/zoe/test/unitTests/contracts/gimix/test-terminate.ts @@ -28,6 +28,8 @@ const test = anyTest as TestFn>>; // const PLATFORM_CONFIG = '@agoric/vm-config/decentral-core-config.json'; const PLATFORM_CONFIG = '@agoric/vm-config/decentral-itest-vaults-config.json'; +const idOf = b => `b1-${b.endoZipBase64Sha512}`; + const makeTestContext = async t => { const bundleCache = await makeNodeBundleCache('bundles/', {}, s => import(s)); @@ -124,18 +126,17 @@ test('terminate a contract by upgrading to one that shuts down', async t => { t.log('installed', values(bundles).length, 'bundles'); - const { postalSvc: bundle } = bundles; - let script = hideImportExpr( redactImportDecls(omitExportKewords(`${startPostalSvcScript}`)), ); + const { postalSvc: bundle } = bundles; script = script.replace( - /bundleID = fail.*/, - `bundleID = ${JSON.stringify(`b1-${bundle.endoZipBase64Sha512}`)},`, + /bundleID = Fail\b.*/, + `bundleID = ${JSON.stringify(idOf(bundle))},`, ); - t.log('start postalSvc'); + // t.log('start postalSvc', script, psManifest.startPostalSvc); await runCoreEval([ { json_permits: JSON.stringify(psManifest.startPostalSvc),