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

improve choice tests and add downgrade ones #20353

Open
wants to merge 1 commit into
base: main-2.x
Choose a base branch
from

Conversation

paulbrauner-da
Copy link
Contributor

The current choice test are not testing much: they are testing that a static call to a v2 choice on a v1 contract will succeed as expected by calling the choice as defined in the v2 template. But no upgrade of the choice argument is performed. This PR changes that. It:

  • recognizes that choice arg upgrades only happen in exercise and exercise by key commands, and disable these test cases for all other operations and for "by choice" entry points.
  • uses a package name instead of a package ID when exercising choices in commands, which is the only way we can trigger a choice arg upgrade
  • removes type annotation from choice arg values

The PR also introduces downgrade tests for choice args.

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.

1 participant