Skip to content

Commit

Permalink
test(zoe); offers remain open
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Dec 6, 2023
1 parent e594dbd commit 03e77b6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
18 changes: 18 additions & 0 deletions proposals/b:zoe1/post.test.js
Original file line number Diff line number Diff line change
@@ -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');
});
5 changes: 5 additions & 0 deletions upgrade-test-scripts/lib/cliHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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 $({
Expand Down

0 comments on commit 03e77b6

Please sign in to comment.