-
Notifications
You must be signed in to change notification settings - Fork 12
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: add integration tests for Pausable
plugins
#51
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good to me, nice job! Just a few nits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LTGM, nice work
} | ||
|
||
/// Exposing internal methods to facilitate integration testing. | ||
/// TODO needed for this contract? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this question answered now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It turned out that these functions are not needed for the Pausable
test contract. They're removed in 5fe4f37.
Thanks for catching another open TODO!
CI is green and I've double checked that there are no more open TODOs related to this PR, so merging now. |
Previously
Pausable
was tested by unit tests vianear_sdk::testing_env
, which mocks the chain.The new integration tests compile the contract in
near-plugins/tests/contracts/pausable
, deploy it on chain via nearworkspaces
and send transactions to it.This is a step towards having only one contract for the
Pausable
plugin which is used for tests and serves as documentation resp. example, as laid out in #48. In a follow up PR I’ll clean up duplicate example contracts.Other changes: refactor
near-plugins/tests/common
AccessControllable
was tested via integration tests.