-
Notifications
You must be signed in to change notification settings - Fork 290
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
[mpm] Support integration test template variable #3533
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3533 +/- ##
==========================================
- Coverage 29.41% 29.34% -0.06%
==========================================
Files 589 589
Lines 49805 49753 -52
Branches 23433 23425 -8
==========================================
- Hits 14643 14595 -48
+ Misses 21015 20848 -167
- Partials 14147 14310 +163
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Benchmark for 7a703d9Click to view benchmark
|
896919b
to
b131318
Compare
集成测试改了一下输出,为了能在后面拿到前面交易的数据,把交易信息以及执行的 output 也都记录在 exp 文件里了。 效果还可以,就是输出有点多, @muzixinly @welbon 一起给看看 starcoin/vm/starcoin-transactional-test-harness/tests/cases/arg_variable.move Lines 11 to 17 in b131318
|
输出很丰富,当单文件test case很多的时候,输出也会很多,如果有个参数来控制输出就更好了。 |
额外,proposal投票时,依赖rcp调用,state.get_with_proof_by_root_raw,这次的集成测试里会支持类似rpc调用能力? @jolestar |
这个输出是用来判断结果的,多次输出要保持一致,如果通过参数控制的话两次输出就不一样了。 |
加了一个 RPC 调用的命令 starcoin/vm/starcoin-transactional-test-harness/tests/cases/call_api_cmd.move Lines 1 to 15 in 04c9269
|
a952563
to
193c29a
Compare
Benchmark for e41d954Click to view benchmark
|
在投票场景,用下面的测试代码遇到了几个问题: call-api 的USAGE里的描述是这样的,参数感觉被截断了,应该怎么填? 2)在集成测试场景,state.get_with_proof_by_root_raw第一个参数access path应该是泛型来动态生成的,为了测试,在指定seed节点时,能否通过指定publicekey来复用某个指定的address时,会有安全问题? 具体的测试代码如下: //# init --rpc http://barnard.seed.starcoin.org --block-number 6201718 //# faucet --addr creator --amount 100000000000 //# faucet --addr alice --amount 10000000000 //# call-api state.get_with_proof_by_root_raw ["0x6bfb460477adf9dd0455d3de2fc7f211/1/0x00000000000000000000000000000001::IdentifierNFT::IdentifierNFT<0x6bfb460477adf9dd0455d3de2fc7f211::SBTModule::DaoMember<0x6bfb460477adf9dd0455d3de2fc7f211::SBTModule::SbtTestDAO>, 0x6bfb460477adf9dd0455d3de2fc7f211::SBTModule::DaoMemberBody<0x6bfb460477adf9dd0455d3de2fc7f211::SBTModule::SbtTestDAO>>","0xd5cd5dc44799c989a84b7d4a810259f373b13a9bf8ee21ecbed0fab264e2090d"] //TODO how to convert the type.
} @jolestar 帮看下 |
多了一个空格
命令行参数是以空格切分的 |
Benchmark for f19de5eClick to view benchmark
|
99541c0
to
370ab18
Compare
支持了 hack 任意账号, 可以用任意账号发交易 resolve #3537 |
e066e12
to
c795122
Compare
Ok(kept) if kept.is_success() => Ok(None), | ||
match output.output.status { | ||
TransactionStatusView::Executed => { | ||
self.hack_account(addr)?; |
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.
所有 faucet 的 Address 都被 hack 可能存在两个问题:
- 存在需要验证签名的需求,如果所有 Address 都被 hack 了,那就无法进行签名验证了;
- 如果想 hack 某个 Address, 但又不需要 faucet,开发者却必须用 faucet 指令去 hack,有点不太友好。
也行可以在 init 里面增加选项,hack 指定的 Address?
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.
所有 faucet 的 Address 都被 hack 可能存在两个问题:
- 存在需要验证签名的需求,如果所有 Address 都被 hack 了,那就无法进行签名验证了;
- 如果想 hack 某个 Address, 但又不需要 faucet,开发者却必须用 faucet 指令去 hack,有点不太友好。
也行可以在 init 里面增加选项,hack 指定的 Address?
这个问题我也想过:
- 验证签名的逻辑很难在合约里实现。好像没遇到类似的需求。
- 用 faucet 的好处是 faucet 后的账号一定存在,这样直接 hack auth key 就行。但如果在 init 里面增加,当目标账号不存在时, 还有个创建账号的问题。
@lerencao 也帮忙看看。
Benchmark for ef41c8eClick to view benchmark
|
ecd1c5c
to
230db1a
Compare
Benchmark for c0ffdb9Click to view benchmark
|
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: #3537 #3513
What is the new behavior?
Other information
Move PR starcoinorg/move#5