Skip to content

Commit

Permalink
test(a3p): move localchain test to upgrade-next (#9467)
Browse files Browse the repository at this point in the history
## Description

`init-localchain` is run in the upgrade handler so the test of it
belongs in the same (upgrade) proposal.

### Security Considerations

<!-- Does this change introduce new assumptions or dependencies that, if
violated, could introduce security vulnerabilities? How does this PR
change the boundaries between mutually-suspicious components? What new
authorities are introduced by this change, perhaps by new API calls?
-->

### Scaling Considerations

<!-- Does this change require or encourage significant increase in
consumption of CPU cycles, RAM, on-chain storage, message exchanges, or
other scarce resources? If so, can that be prevented or mitigated? -->

### Documentation Considerations

<!-- Give our docs folks some hints about what needs to be described to
downstream users.

Backwards compatibility: what happens to existing data or deployments
when this code is shipped? Do we need to instruct users to do something
to upgrade their saved data? If there is no upgrade path possible, how
bad will that be for users?

-->

### Testing Considerations

<!-- Every PR should of course come with tests of its own functionality.
What additional tests are still needed beyond those unit tests? How does
this affect CI, other test automation, or the testnet?
-->

### Upgrade Considerations

<!-- What aspects of this PR are relevant to upgrading live production
systems, and how should they be addressed? -->
  • Loading branch information
mergify[bot] authored Jun 8, 2024
2 parents 3154483 + 26c633e commit c19f1b5
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 2,307 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/* eslint-disable @jessie.js/safe-await-separator */
import test from 'ava';

import { agd, waitForBlock } from '@agoric/synthetic-chain';
import { agd, evalBundles, waitForBlock } from '@agoric/synthetic-chain';

const SUBMISSION_DIR = 'localchaintest-submission';

const readPublished = async path => {
const { value } = await agd.query(
Expand All @@ -18,7 +19,11 @@ const readPublished = async path => {
return obj.values[0];
};

// The testing assertions are in the submission that runs in the core-eval.
// The test here runs that and confirms the eval made it through all the assertions.
test(`localchain passes tests`, async t => {
await evalBundles(SUBMISSION_DIR);

const nodePath = 'test.localchain';
const nodeValue = JSON.stringify({ success: true });

Expand Down
3 changes: 2 additions & 1 deletion a3p-integration/proposals/a:upgrade-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"coreProposals": []
},
"sdk-generate": [
"vats/probe-zcf-bundle.js probe-submission"
"vats/probe-zcf-bundle.js probe-submission",
"vats/test-localchain.js localchaintest-submission"
],
"type": "Software Upgrade Proposal"
},
Expand Down
1 change: 0 additions & 1 deletion a3p-integration/proposals/b:localchain/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion a3p-integration/proposals/b:localchain/.yarnrc.yml

This file was deleted.

6 changes: 0 additions & 6 deletions a3p-integration/proposals/b:localchain/README.md

This file was deleted.

23 changes: 0 additions & 23 deletions a3p-integration/proposals/b:localchain/package.json

This file was deleted.

4 changes: 0 additions & 4 deletions a3p-integration/proposals/b:localchain/test.sh

This file was deleted.

Loading

0 comments on commit c19f1b5

Please sign in to comment.