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

test(a3p): extend test coverage for Vaults on z:acceptance #10280

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

Jorge-Lopes
Copy link
Collaborator

closes: Agoric/BytePitchPartnerEng#22
closes: Agoric/BytePitchPartnerEng#15

Description

The purpose of this PR is to extend the z:acceptance testing coverage of Vaults to include the following cases:

  • user cannot open a vault above debt limit
  • user can open a vault under debt limit
  • user cannot increase vault debt above debt limit
  • MintFee is applied to users debt when creating a vault and minting more IST
  • Oracle prices are being received
  • vaults that existed before the most recent upgrade continue to be useable
  • user can pay off debt when total debt is above debt limit

The existing tests were also refactored to take advantage of the new helper functions built and also included in this PR.

In addition to extending the test cases, other key updates are as follows:

  • A pushPrice.js script was introduced to setup the oracles and push prices for the desired brands in the use phase of f:replace-price-feeds proposal.
  • Update f:replace-price-feeds/priceFeedUpdate.test.js to reflect the new price feed handling.
  • A openVault.js script was introduced to open a new vault in the use phase of n:upgrade-next proposal

A more detailed discussion of the decisions made for the implementations above can be found on the issue: Agoric/BytePitchPartnerEng#22

Security Considerations

none

Scaling Considerations

none

Documentation Considerations

none

Testing Considerations

This PR included a new file, /z:acceptance/test-lib/ratio.js, which exports the method ceilMultiplyBy , which is also exported by the @agoric/zoe package.

The reason why this file was created was because when trying to install the @agoric/zoe package at the a3p-integration z:acceptance proposal, it failed because @agoric/xsnap package couldn't be built successfully.
As described in the issue #10259

When resolved, the ratio.js file should be removed and the ceilMultiplyBy method should be imported from the @agoric/zoe package.

Upgrade Considerations

none

Copy link

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

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: ee74839
Status: ✅  Deploy successful!
Preview URL: https://40d6f320.agoric-sdk.pages.dev
Branch Preview URL: https://jorge-acceptance-vauts-test.agoric-sdk.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant