Skip to content

Commit

Permalink
test: move a3p-integration test files under .../test/
Browse files Browse the repository at this point in the history
generated proposals into  .../generated
  • Loading branch information
Chris-Hibbert committed Feb 7, 2025
1 parent 420220f commit 5576d7e
Show file tree
Hide file tree
Showing 35 changed files with 24 additions and 181 deletions.
7 changes: 1 addition & 6 deletions a3p-integration/proposals/n:upgrade-next/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
addCollateral/
addUsdLemons/
agoricNamesCoreEvals/
depositUSD-LEMONS/
nullUpgradePP/
swapAnchorForMintedSeat/
test/generated/
6 changes: 3 additions & 3 deletions a3p-integration/proposals/n:upgrade-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
},
"type": "Software Upgrade Proposal",
"sdk-generate": [
"testing/add-USD-LEMONS.js addUsdLemons",
"testing/add-USD-OLIVES.js agoricNamesCoreEvals/addUsdOlives",
"testing/publish-test-info.js agoricNamesCoreEvals/publishTestInfo"
"testing/add-USD-LEMONS.js test/generated/addUsdLemons",
"testing/add-USD-OLIVES.js test/generated/agoricNamesCoreEvals/addUsdOlives",
"testing/publish-test-info.js test/generated/agoricNamesCoreEvals/publishTestInfo"
]
},
"type": "module",
Expand Down
13 changes: 6 additions & 7 deletions a3p-integration/proposals/n:upgrade-next/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

set -euo pipefail

yarn ava initial.test.js
yarn ava replaceFeeDistributor.test.js
yarn ava mintHolder.test.js
yarn ava provisionPool.test.js
# segregate so changing these does not invalidate the proposal image
# à la https://github.com/Agoric/agoric-3-proposals/pull/213
cd test

yarn ava agoricNames.test.js
GLOBIGNORE=initial.test.js
yarn ava initial.test.js

yarn ava assetReserve.test.js
yarn ava psm.test.js
yarn ava *.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ import { getBalances, listVaults } from './test-lib/utils.js';
import { walletUtils } from './test-lib/index.js';

const WRITE_AGORIC_NAMES_DIR = 'agoricNamesCoreEvals/writeToAgoricNames';
const ADD_USD_OLIVES_DIR = 'agoricNamesCoreEvals/addUsdOlives';
const ADD_USD_OLIVES_DIR = 'generated/agoricNamesCoreEvals/addUsdOlives';
const DEPOSIT_USD_OLIVES_DIR = 'agoricNamesCoreEvals/depositUsdOlives';
const PUBLISH_TEST_INFO_DIR = 'agoricNamesCoreEvals/publishTestInfo';
const PUBLISH_TEST_INFO_DIR = 'generated/agoricNamesCoreEvals/publishTestInfo';
const WRITE_TEST_INFO_DIR = 'agoricNamesCoreEvals/writeToTestInfo';

const makeWaitUntilKeyFound = (keyFinder, vstorage) => (path, targetKey) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
waitUntilContractDeployed,
} from '@agoric/client-utils';

const ADD_PSM_DIR = 'generated/addUsdLemons';
const ADD_COLLATERAL = 'addCollateral';

const ambientAuthority = {
Expand Down Expand Up @@ -53,8 +54,7 @@ test.serial('add Collateral to reserve', async t => {
// @ts-expect-error casting
const { vstorageKit } = t.context;

// USD_LEMONS introduced in provisionPool test
// await evalBundles(ADD_PSM_DIR);
await evalBundles(ADD_PSM_DIR);
await waitUntilContractDeployed('psm-IST-USD_LEMONS', ambientAuthority, {
errorMessage: 'psm-IST-USD_LEMONS instance not observed.',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test('verify mintHolder contract upgrade', async t => {

let assetList = await getAssetList();
t.log('List of mintHolder vats being upgraded: ', assetList);
// FastUSDC doesn't have a contractKit indexed by its label
// The FastLP mint is not in a mintHolder; it's a ZCFMint from the FastUSDC contract
const assetListNoFastUSDC = assetList.filter(x => x.label !== 'FastLP');
await mintPayment(t, receiver, assetListNoFastUSDC, 10);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ import { getIncarnationFromDetails } from './test-lib/utils.js';

const PROVISIONING_POOL_ADDR = 'agoric1megzytg65cyrgzs6fvzxgrcqvwwl7ugpt62346';

const ADD_PSM_DIR = 'addUsdLemons';
const DEPOSIT_USD_LEMONS_DIR = 'depositUSD-LEMONS';
const NULL_UPGRADE_PP_DIR = 'nullUpgradePP';

Expand Down Expand Up @@ -109,8 +108,8 @@ test.serial(
{ errorMessage: 'Provision pool not able to swap USDC_axl for IST.' },
);

// Introduce USD_LEMONS
await evalBundles(ADD_PSM_DIR);
// agoricNames already added USD_LEMONS
// await evalBundles(ADD_PSM_DIR);
await waitUntilContractDeployed('psm-IST-USD_LEMONS', ambientAuthority, {
errorMessage: 'psm-IST-USD_LEMONS instance not observed.',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ export const mintPayment = async (t, address, assetList, value) => {

for (const asset of assetList) {
const { label, denom } = asset;

// XXX I don't know what asset shows up like this, but let's ignore it.
if (!label) {
console.log('MINT PAYMENT undef', asset);
continue;
}
const scaled = BigInt(parseInt(value, 10) * 1_000_000).toString();

await replaceTemplateValuesInFile(`${SUBMISSION_DIR}/send-script`, {
Expand Down
7 changes: 1 addition & 6 deletions a3p-integration/proposals/n:upgrade-next/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
"skipLibCheck": true
},
"exclude": [
"addCollateral/",
"addUsdLemons/",
"agoricNamesCoreEvals/",
"depositUSD-LEMONS/",
"nullUpgradePP/",
"swapAnchorForMintedSeat/"
"generated/"
]
}
129 changes: 0 additions & 129 deletions a3p-integration/proposals/n:upgrade-next/vatDetails.js

This file was deleted.

22 changes: 0 additions & 22 deletions a3p-integration/proposals/n:upgrade-next/verifyPushedPrice.js

This file was deleted.

0 comments on commit 5576d7e

Please sign in to comment.