`#[only_owner]` attribute by Rust Testing Framework
newtmex opened this issue · 2 comments
newtmex commented
Seems like a bug; the Rust Testing Framework does not handle endpoints annotated with the #[only_owner]
as expected.
andrei-marinica commented
The Rust Testing Framework, as it is, gives you access directly to the contract methods, so annotations do not come into effect in this case (and cannot for that matter).
There is an alternate way to test contracts in a setting more akin to the real blockchain, check this out: https://github.com/ElrondNetwork/elrond-wasm-rs/blob/master/contracts/examples/multisig/tests/multisig_rust_test_v2.rs
It's closer to mandos, but in a programmatic Rust way.
newtmex commented
Thanks @andrei-marinica for the reply.
I will study the file.
(Also thanks for the elrond-interact-snippets
library, it's a very useful tool.