Conversation
The transaction JSON has payment_id nested inside the 'info' object, but the assertion was only checking the root level. Updated to check info.payment_id first, with fallbacks to root-level fields. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the project's testing infrastructure by integrating Cucumber tests into the continuous integration pipeline. It also includes several bug fixes and improvements across the API, database interactions, and transaction logic, making the system more robust and flexible, particularly for handling multi-recipient transactions and providing clearer API responses. Highlights
Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds Cucumber tests to the CI pipeline and includes several bug fixes and refactorings. My review focuses on a critical typo in the CI configuration that would cause it to fail, the removal of several test scenarios which reduces test coverage, and a few opportunities for code improvement, such as adding more robust error handling and removing redundant code. Overall, the changes improve the test infrastructure, but care should be taken not to lose valuable test cases in the process.
I am having trouble creating individual review comments. Click here to see my feedback.
.cargo/config.toml (7)
There appears to be a typo in the ci-cucumber command. cucumbe should likely be cucumber. This will probably cause the CI step to fail.
ci-cucumber = "test --release --test cucumber"
integration-tests/features/mining.feature (17-22)
The "Sync between two nodes" scenario has been removed. While this might be necessary to get CI passing if the test is flaky, removing tests reduces coverage. It would be better to fix the underlying issue or temporarily ignore the test with a ticket to track the fix. Please consider adding this scenario back, perhaps with an @ignore tag if it's currently failing.
integration-tests/features/transactions.feature (34-38)
The "Create transaction with custom lock duration" scenario has been removed. Similar to other test removals in this PR, this reduces test coverage. If this feature is still supported, the test should be kept. If it's flaky, consider ignoring it temporarily with a tracking issue rather than deleting it.
integration-tests/steps/daemon.rs (25)
Using .unwrap() can lead to less informative panic messages in case of an error. It's better practice to use .expect() with a descriptive message to aid in debugging.
.expect("Failed to create dual address");
integration-tests/steps/transactions.rs (43)
world.output_file is being set here, but it was already set on line 22 with a clone of output_path. This second assignment is redundant. It's best to remove this line to avoid confusion and potential issues if output_path were to be used after this move.
minotari/src/transactions/one_sided_transaction.rs (241-242)
The use of unwrap_or_else here silently ignores potential errors when creating a MemoField from a payment ID string (e.g., if the string is too long). This could lead to a transaction being created with an empty memo without any indication to the user that their provided payment ID was invalid. It would be better to at least log a warning when new_open_from_string fails.
Some(s) => MemoField::new_open_from_string(s, TxType::PaymentToOther)
.unwrap_or_else(|e| {
log::warn!("Invalid payment ID provided: '{}'. Error: {}. Using empty memo.", s, e);
MemoField::new_empty()
}),
| ci-clippy = "lints clippy --all-targets --all-features" | ||
| ci-test-compile = "test --no-run --workspace --all-features --no-default-features" | ||
| ci-test = "nextest run --all-features --release --workspace --exclude integration-tests --no-fail-fast" | ||
| ci-cucumber = "test --release --test cucumber --package integration-tests" |
Description
Adds cucumber tests to ci
fixes a few bugs