diff --git a/proposals/b:zoe1/post.test.js b/proposals/b:zoe1/post.test.js index 16f8024c..c62568e3 100644 --- a/proposals/b:zoe1/post.test.js +++ b/proposals/b:zoe1/post.test.js @@ -1,7 +1,25 @@ import test from 'ava'; import { getIncarnation } from '../../upgrade-test-scripts/lib/vat-status.js'; +import { agops } from '../../upgrade-test-scripts/lib/cliHelper.js'; test(`Zoe vat was upgraded`, async t => { const incarantion = await getIncarnation('zoe'); t.is(incarantion, 1); }); + +/** + * 1. make an offer that stays open + * 2. restart the vat-admin vat + * 3. make sure the offer is still open + */ +test('offer stays open after vat-admin restart', async t => { + // make an offer that stays open + console.log('making an offer that stays open'); + agops.inter('bid by-price --give 1IST --price 30 --from gov1'.split(' ')); + + // restart the vat-admin vat + console.log('restarting the vat-admin vat'); + + // make sure the offer is still open + console.log('making sure the offer is still open'); +}); diff --git a/upgrade-test-scripts/lib/cliHelper.js b/upgrade-test-scripts/lib/cliHelper.js index cb3c3adf..39c2329d 100644 --- a/upgrade-test-scripts/lib/cliHelper.js +++ b/upgrade-test-scripts/lib/cliHelper.js @@ -81,6 +81,7 @@ export const { stdout: agopsLocation } = await $({ cwd: '/usr/src/agoric-sdk', })`yarn bin agops`; +// TODO use a proxy instead of repeating every command name export const agops = { vaults: async (...params) => { const newParams = ['vaults', ...params]; @@ -111,6 +112,10 @@ export const agops = { const newParams = ['auctioneer', ...params]; return executeCommand(agopsLocation, newParams); }, + inter: async (...params) => { + const newParams = ['inter', ...params]; + return executeCommand(agopsLocation, newParams); + }, }; export const { stdout: bundleSourceLocation } = await $({