-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat(starknet_integration_tests): end to end integration test as exec… #2598
feat(starknet_integration_tests): end to end integration test as exec… #2598
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2598 +/- ##
==========================================
- Coverage 40.10% 35.00% -5.11%
==========================================
Files 26 277 +251
Lines 1895 32227 +30332
Branches 1895 32227 +30332
==========================================
+ Hits 760 11281 +10521
- Misses 1100 19939 +18839
- Partials 35 1007 +972 ☔ View full report in Codecov by Sentry. |
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.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @lev-starkware)
crates/starknet_integration_tests/src/bin/e2e_integration_test.rs
line 16 at r1 (raw file):
// Run end to end integration test. end_to_end_integration(tx_generator).await; }
Great!
Could you please also change the test in tests
dir to directly invoke this executable?
Suggested way:
- Use
create_shell_command
to invoke the binary from within the test. - To get its path, check https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-crates and look for
CARGO_BIN_EXE_
.
Going through the env variable should have twofold advantages:
- No need for messy dir traversals to find the test binary
- The doc mentions this way also builds the binary, so no need to do that manually:
Binaries are automatically built when the test is built, unless the binary has required features that are not enabled.
Code quote:
#[tokio::main]
async fn main() {
configure_tracing();
info!("Running integration test setup.");
// Creates a multi-account transaction generator for integration test
let tx_generator = create_integration_test_tx_generator();
// Run end to end integration test.
end_to_end_integration(tx_generator).await;
}
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.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @Itay-Tsabary-Starkware)
crates/starknet_integration_tests/src/bin/e2e_integration_test.rs
line 16 at r1 (raw file):
Previously, Itay-Tsabary-Starkware wrote…
Great!
Could you please also change the test intests
dir to directly invoke this executable?Suggested way:
- Use
create_shell_command
to invoke the binary from within the test.- To get its path, check https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-crates and look for
CARGO_BIN_EXE_
.Going through the env variable should have twofold advantages:
- No need for messy dir traversals to find the test binary
- The doc mentions this way also builds the binary, so no need to do that manually:
Binaries are automatically built when the test is built, unless the binary has required features that are not enabled.
Done.
c6ead48
to
9ea8d82
Compare
5fd70eb
to
154812d
Compare
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.
Reviewable status: 0 of 1 files reviewed, all discussions resolved
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.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @lev-starkware)
154812d
to
c613afd
Compare
…on test functions to a module commit-id:b8a2fdfb
…utable (not test) commit-id:7a6dd4a7
1e0c53d
to
26d77c7
Compare
c613afd
to
736d6b5
Compare
…utable (not test)
commit-id:7a6dd4a7
Stack: