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

Update tests to run against local network instead of redwood #57

Conversation

clevinson
Copy link
Member

@clevinson clevinson commented Sep 16, 2022

This PR is intended to aid with testing of #56 against a local regen network.

Since we are switching strategy to fix the original amino signing bug on regen ledger, we need to be able to run tests against a local network (from a local build)

The process for running these tests is as follows:

  • clone regen ledger and checkout ty/fix_amino branch (from fix(x/ecocredit): amino registration for ecocredit msgs (backport #1481) regen-ledger#1483)
  • run make build
  • run ./build/regen testnet start (this will start a local testnet, and output a mnemonic with some testnet stake tokens that can be used as a faucet)
  • run export FAUCET_MNEMONIC="the mnemonic output from the above command"
  • run export NODE_URL="http://localhost:26657"
  • cd into packages/api and run yarn test

At this point in time the only working test in amino.spec.ts is the one that funds the test accounts. All other tests are failing and it seems to be due to an issue that still persists in regen ledger (see regen-network/regen-ledger#1481 (comment)).

Once the ledger issue has a working branch, it should be possible to run these amino tests and get some of them to pass. Some tests may still fail due to expectations that these tests have on application state of the network (e.g. marketplace denom allow list, stake vs uregon staking denom, certain credit classes in existence).

@clevinson
Copy link
Member Author

The ledger issue (which was a silly go.mod thing) has been resolved. I've confirmed that the MsgCreateCreditClass test passes, and consider the amino issue resolved (at least on the regen ledger side). We should probably still update this test suite to make sure it handles nested messages correct.

@clevinson
Copy link
Member Author

Closing this in favor of #56. I ended up taking a different approach that doesn't require nearly as much monkey business, and allows the existing tests to pretty much run as is.

@clevinson clevinson closed this Oct 3, 2022
@ryanchristo ryanchristo deleted the clevinson/local-regen-testing branch July 11, 2023 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants