Skip to content

Commit

Permalink
fixup! test(a3p): create a3p test for replace electorate core eval
Browse files Browse the repository at this point in the history
chore: following ocap principles
  • Loading branch information
frazarshad committed Oct 21, 2024
1 parent 5b5407e commit 5f15b88
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
6 changes: 5 additions & 1 deletion a3p-integration/proposals/z:acceptance/governance.test.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
/* global fetch */

import test from 'ava';
import '@endo/init';
import { GOV1ADDR, GOV2ADDR, GOV3ADDR } from '@agoric/synthetic-chain';
import { governanceDriver, walletUtils, waitUntil } from './test-lib/index.js';
import { walletUtils, waitUntil, networkConfig } from './test-lib/index.js';
import { getLastUpdate } from './test-lib/wallet.js';
import { makeGovernanceDriver } from './test-lib/governance.js';

const governanceAddresses = [GOV1ADDR, GOV2ADDR, GOV3ADDR];

test.serial(
'economic committee can make governance proposal and vote on it',
async t => {
const { readLatestHead } = walletUtils;
const governanceDriver = await makeGovernanceDriver(fetch, networkConfig);

/** @type {any} */
const instance = await readLatestHead(`published.agoricNames.instance`);
Expand Down
7 changes: 0 additions & 7 deletions a3p-integration/proposals/z:acceptance/test-lib/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* global fetch setTimeout */
import { execFileSync } from 'child_process';
import { makeWalletUtils } from './wallet.js';
import { makeGovernanceDriver } from './governance.js';

export const networkConfig = {
rpcAddrs: ['http://0.0.0.0:26657'],
Expand All @@ -22,12 +21,6 @@ export const walletUtils = await makeWalletUtils(
networkConfig,
);

// eslint-disable-next-line @jessie.js/safe-await-separator -- buggy version
export const governanceDriver = await makeGovernanceDriver(
fetch,
networkConfig,
);

export const waitUntil = async timestamp => {
const timeDelta = Math.floor(Date.now() / 1000) - Number(timestamp);
await delay(timeDelta);
Expand Down

0 comments on commit 5f15b88

Please sign in to comment.