-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
fix(x/accounts): TestPeriodicAccountSendCoinsUnauthorized
doesn't test correctly
#23694
base: main
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughThe pull request modifies the test function Changes
Sequence Diagram(s)sequenceDiagram
participant Test as TestPeriodicAccountSendCoinsUnauthorized
participant CTX as newMockContext2
participant Store as KVStoreService
participant Account as setupPeriodicAccount
participant Error as Error Handler
Test->>CTX: Call newMockContext2(t)
CTX-->>Test: Return ctx2 and ss2 (Store)
Test->>Test: Set sdkCtx2 time to time.Now()
Test->>Account: Create new periodic account (acc2) with sdkCtx2 and ss2
Account-->>Test: Return acc2
Test->>Error: Attempt to send coins with updated context
Error-->>Test: Return specific unauthorized error (sender not vesting account owner)
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yml 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (2)`**/*.go`: Review the Golang code for conformity with the Ub...
`**/*_test.go`: "Assess the unit test code assessing suffici...
⏰ Context from checks skipped due to timeout of 90000ms (13)
🔇 Additional comments (4)
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
b0b37a8
to
139bab5
Compare
Description
TestPeriodicAccountSendCoinsUnauthorized
doesn't make a correct test forsendcoin unauthorized
case.Before this fix, the error returns by
acc.SendCoins
is"invalid owner address: collections: not found: key 'no_key' of type bytes"
After this fix, the error returns is
"sender is not the owner of this vesting account"
Summary by CodeRabbit