-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
Cleanup and test rework #17116
Cleanup and test rework #17116
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
this can go in as is or wait for me to add more tests to |
#[test_only] | ||
public fun transfer_status_pending(): u8 { | ||
TRANSFER_STATUS_PENDING | ||
} |
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.
can we make these const public instead?
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.
unfortunately there is no public const concept in move, all const are private to the module
#[test_only] | ||
public fun setup_treasury_for_testing(bridge: &mut Bridge) { | ||
bridge.load_inner_mut().treasury.setup_for_testing(); | ||
} |
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.
for these kind of test-only helpers, is it better to just make them public(package
or friend
(if it's still a thing in move 2024?) @dariorussi
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 does not really matter because those are compiled away.
I am not sure if there is a "standard" here, I'll find out.
We are talking about unit tests having visibility over the module they are testing but that is a change on the compiler side (and maybe more) that is not scheduled or planned yet
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.
cool, i'm curious too but not blocking this PR
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 for the cleanup and refactor! mostly look good to me, with several questions
abort TEST_DONE | ||
} | ||
|
||
// #[test] |
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 do we have these commented?
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.
because they do not work yet as I need to build more infra for those tests... I did not want to have them completely out yet, which I could if we are going to get this in as it is
## Description More Move2024 cleanup and formatting. Moved tests out of `bridge.move` in its own test directory. We will transition all tests to that model as we work towards 100% test coverage. ## Test plan This is mostly tests --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK:
## Description More Move2024 cleanup and formatting. Moved tests out of `bridge.move` in its own test directory. We will transition all tests to that model as we work towards 100% test coverage. ## Test plan This is mostly tests --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK:
## Description More Move2024 cleanup and formatting. Moved tests out of `bridge.move` in its own test directory. We will transition all tests to that model as we work towards 100% test coverage. ## Test plan This is mostly tests --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK:
## Description More Move2024 cleanup and formatting. Moved tests out of `bridge.move` in its own test directory. We will transition all tests to that model as we work towards 100% test coverage. ## Test plan This is mostly tests --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK:
## Description More Move2024 cleanup and formatting. Moved tests out of `bridge.move` in its own test directory. We will transition all tests to that model as we work towards 100% test coverage. ## Test plan This is mostly tests --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK:
## Description More Move2024 cleanup and formatting. Moved tests out of `bridge.move` in its own test directory. We will transition all tests to that model as we work towards 100% test coverage. ## Test plan This is mostly tests --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK:
Description
More Move2024 cleanup and formatting.
Moved tests out of
bridge.move
in its own test directory.We will transition all tests to that model as we work towards 100% test coverage.
Test plan
This is mostly tests
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.