-
Notifications
You must be signed in to change notification settings - Fork 106
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
refactor(ethexe): simplify program creation and message sending in tests #4455
base: master
Are you sure you want to change the base?
Conversation
…st cases - Updated test cases to remove unnecessary payload and value parameters in `create_program` calls. - Replaced direct assertions on initialization message properties with assertions on reply messages.
@@ -1202,18 +1267,10 @@ mod utils { | |||
} | |||
|
|||
// TODO (breathx): split it into different functions WITHIN THE 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.
rm todo
payload: &[u8], | ||
value: u128, | ||
) -> Result<WaitForProgramCreation> { | ||
pub async fn create_program(&self, code_id: CodeId) -> Result<WaitForProgramCreation> { |
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.
rm EXECUTABLE BALANCE constant in favor of func argument / another func that will create program and topup balance
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.
so in case of absence of exec balance there's no need in approve
assert_eq!( | ||
res.reply_code, | ||
ReplyCode::Success(SuccessReplyReason::Manual) | ||
); | ||
assert_eq!(res.reply_payload, b"PONG"); |
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.
overall refactor would be good as well
assert_eq!(res.reply_payload, b"PONG"); | |
assert_eq!(reply.payload, b"PONG"); // etc |
create_program
calls.