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

[cli]list resource support filter struct_type and start_idx max_size #3639

Merged
merged 2 commits into from
Aug 11, 2022
Merged

[cli]list resource support filter struct_type and start_idx max_size #3639

merged 2 commits into from
Aug 11, 2022

Conversation

YouNeedWork
Copy link
Contributor

Pull request type

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue Number: #3613

@codecov
Copy link

codecov bot commented Aug 11, 2022

Codecov Report

Merging #3639 (fbd9575) into master (e2513cb) will increase coverage by 0.04%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3639      +/-   ##
==========================================
+ Coverage   28.58%   28.62%   +0.04%     
==========================================
  Files         591      591              
  Lines       50602    50611       +9     
  Branches    23860    23865       +5     
==========================================
+ Hits        14462    14480      +18     
+ Misses      21934    21861      -73     
- Partials    14206    14270      +64     
Flag Coverage Δ
unittests 28.62% <0.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cmd/starcoin/src/state/list_cmd.rs 0.00% <0.00%> (ø)
vm/natives/src/lib.rs 80.00% <0.00%> (-10.00%) ⬇️
vm/natives/src/token.rs 17.78% <0.00%> (-8.88%) ⬇️
state/state-store-api/src/lib.rs 31.25% <0.00%> (-6.25%) ⬇️
state/state-tree/src/mock/mod.rs 39.14% <0.00%> (-4.34%) ⬇️
types/src/account_state.rs 56.67% <0.00%> (-3.33%) ⬇️
commons/service-registry/src/service_actor.rs 37.64% <0.00%> (-3.22%) ⬇️
config/src/account_provider_config.rs 25.40% <0.00%> (-3.17%) ⬇️
vm/types/src/time.rs 68.75% <0.00%> (-3.12%) ⬇️
commons/accumulator/src/tree_store/mock.rs 28.58% <0.00%> (-2.85%) ⬇️
... and 62 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e2513cb...fbd9575. Read the comment docs.

Copy link
Member

@jolestar jolestar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以加个测试用例在

Scenario Outline: [cmd] state test
Then cmd: "state get-root"
Then cmd: "dev get-coin"
Then cmd: "account show"
Then cmd: "state get-proof {{$.account[0].ok.account.address}}/1/0x1::Account::Account"
Then cmd: "state get-proof {{$.account[0].ok.account.address}}/1/0x1::Account::Account --raw"
Then cmd: "state get resource {{$.account[0].ok.account.address}} 0x1::Account::Account"
Then assert: "{{$.state[-1].ok.json.sequence_number}} == 0"
Then cmd: "account show"
Then cmd: "state list resource {{$.account[0].ok.account.address}}"
Then cmd: "account show"
Then cmd: "state list code {{$.account[0].ok.account.address}}"
Then stop

cmd/starcoin/src/state/list_cmd.rs Outdated Show resolved Hide resolved
@YouNeedWork
Copy link
Contributor Author

可以加个测试用例在

Scenario Outline: [cmd] state test
Then cmd: "state get-root"
Then cmd: "dev get-coin"
Then cmd: "account show"
Then cmd: "state get-proof {{$.account[0].ok.account.address}}/1/0x1::Account::Account"
Then cmd: "state get-proof {{$.account[0].ok.account.address}}/1/0x1::Account::Account --raw"
Then cmd: "state get resource {{$.account[0].ok.account.address}} 0x1::Account::Account"
Then assert: "{{$.state[-1].ok.json.sequence_number}} == 0"
Then cmd: "account show"
Then cmd: "state list resource {{$.account[0].ok.account.address}}"
Then cmd: "account show"
Then cmd: "state list code {{$.account[0].ok.account.address}}"
Then stop

老师,看下我加的对吗?

@jolestar jolestar merged commit 81d32a9 into starcoinorg:master Aug 11, 2022
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.

[Feature Request][cmd] state list command support filter resource by type and paging
2 participants