-
Notifications
You must be signed in to change notification settings - Fork 6
Add testing for is_contract
and is_caller_origin
#22
Conversation
CI fails due to https://github.com/paritytech/ci_cd/issues/343. It runs locally though. |
# Create a link to ink! in the local examples of the `ink-waterfall`. | ||
ln -s /path/to/ink/ ./examples/ink |
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.
Why not just use a released version of ink? The CI will replace it with current master anyways.
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.
The CI will replace it with current master anyways.
Huh, how so?
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.
This line:
find ./examples/ -name 'Cargo.toml' -exec sed -i "s|../ink|../$INK_EXAMPLES_PATH|g" {} \;
But I see why now. We want to run it against a custom version locally, too.
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.
Nice contract and test! LGTM
@@ -100,8 +103,8 @@ supply `--features polkadot-js-ui` to `cargo test`. | |||
|
|||
* `INK_EXAMPLES_PATH` ‒ Path to the ink! examples folder. Must be set. | |||
* `UI_URL` ‒ URL of the UI to use. Defaults to the live interface for the chosen UI. | |||
* `WATERFALL_CLOSE_BROWSER` ‒ Do not close browser window at the end of a test run. | |||
Defaults to `true`. Set it to `false` to prevent closing . | |||
* `WATERFALL_CLOSE_BROWSER` ‒ Close browser window at the end of a test run. |
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.
lil typo fix here
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.
Thanks! No biggie, but going forward please avoid pushing to someone else's PR without talking to them first.
|
||
# Remove Cargo.lock when creating an executable, leave it for libraries | ||
# More information here http://doc.crates.io/guide.html#cargotoml-vs-cargolock | ||
Cargo.lock |
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 asks a newline ^
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.
Yeah that's a GitHub thing, we can safely ignore it.
@athei @agryaznov I've added an example contract to the
ink-waterfall
which will run as part of the CI ‒ thus demonstrating thatis_contract
andis_caller_origin
work as intended. Do you think we can now stabilize those two methods inpallet-contracts
?