Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(acceptance): add tests for PSM to z:acceptance #10273

Merged
merged 3 commits into from
Oct 28, 2024
Merged

Conversation

anilhelvaci
Copy link
Collaborator

closes: https://github.com/Agoric/BytePitchPartnerEng/issues/23

Description

Current version of z:acceptance tests do not cover PSM at all. The goal of this PR is to make sure we cover test cases in https://github.com/Agoric/BytePitchPartnerEng/issues/23 prepared by @otoole-brendan

Security Considerations

None.

Scaling Considerations

None.

Documentation Considerations

None.

Testing Considerations

The tests assume that anchorPerMinted ratio is 1. I think this is a safe assumption because;

  1. Unit tests and boot tests for the PSM has the same assumption
  2. The value is read from terms. Therefore, it can only change by "replacing" the USDC_axl instance which is something we shouldn't worry about anytime soon.

Upgrade Considerations

None.

Copy link

cloudflare-workers-and-pages bot commented Oct 15, 2024

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 11b336b
Status: ✅  Deploy successful!
Preview URL: https://f7e884db.agoric-sdk.pages.dev
Branch Preview URL: https://anil-psm-tests.agoric-sdk.pages.dev

View logs

@anilhelvaci

This comment was marked as resolved.

Copy link
Member

@turadg turadg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a code quality pass. I don't have PSM swapped in enough rn to evaluate whether this fully closes the issue.

a3p-integration/proposals/z:acceptance/test-lib/psm-lib.js Outdated Show resolved Hide resolved
a3p-integration/proposals/z:acceptance/test-lib/psm-lib.js Outdated Show resolved Hide resolved
a3p-integration/proposals/z:acceptance/test-lib/psm-lib.js Outdated Show resolved Hide resolved
a3p-integration/proposals/z:acceptance/test-lib/psm-lib.js Outdated Show resolved Hide resolved
a3p-integration/proposals/z:acceptance/test-lib/psm-lib.js Outdated Show resolved Hide resolved
a3p-integration/proposals/z:acceptance/tsconfig.json Outdated Show resolved Hide resolved
a3p-integration/proposals/z:acceptance/package.json Outdated Show resolved Hide resolved
a3p-integration/proposals/z:acceptance/psm.test.js Outdated Show resolved Hide resolved
@anilhelvaci anilhelvaci force-pushed the anil/psm-tests branch 2 times, most recently from 324d3ee to 712f970 Compare October 19, 2024 10:02
@anilhelvaci
Copy link
Collaborator Author

Addressed all change requests outside of #10273 (comment). Should I ask for a re-review once the last one is done as well? @turadg

Copy link
Member

@turadg turadg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGMT. I haven't reviewed for whether this covers all the PSM testing requirements.

Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant to separate the critical comments from the suggestions, but it's taking too long.

Consider these all suggestions. I'll do another pass to look for anything critical.

Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests cover the 6 requested items (New user can complete a swap, ...).

This approval presumes you'll address any lint failures, as usual. No need to re-request review once you've done that.

I found it a little challenging to navigate the split between psm.test.js and psm-lib.js in some places. I made some suggestions about factoring. Those are suggestions; feel free to act on them, respond to them, or ignore them, at your discretion.

a3p-integration/proposals/z:acceptance/psm.test.js Outdated Show resolved Hide resolved
a3p-integration/proposals/z:acceptance/psm.test.js Outdated Show resolved Hide resolved
a3p-integration/proposals/z:acceptance/psm.test.js Outdated Show resolved Hide resolved
a3p-integration/proposals/z:acceptance/psm.test.js Outdated Show resolved Hide resolved
a3p-integration/proposals/z:acceptance/test-lib/psm-lib.js Outdated Show resolved Hide resolved
a3p-integration/proposals/z:acceptance/psm.test.js Outdated Show resolved Hide resolved
a3p-integration/proposals/z:acceptance/psm.test.js Outdated Show resolved Hide resolved
a3p-integration/proposals/z:acceptance/psm.test.js Outdated Show resolved Hide resolved
a3p-integration/proposals/z:acceptance/test-lib/psm-lib.js Outdated Show resolved Hide resolved
@anilhelvaci anilhelvaci force-pushed the anil/psm-tests branch 2 times, most recently from d50ed58 to d48faaf Compare October 27, 2024 16:50
@anilhelvaci anilhelvaci added the automerge:rebase Automatically rebase updates, then merge label Oct 28, 2024
@mergify mergify bot merged commit 2ede8c1 into master Oct 28, 2024
90 checks passed
@mergify mergify bot deleted the anil/psm-tests branch October 28, 2024 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants