-
Notifications
You must be signed in to change notification settings - Fork 12
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
Deepanshutr/chore #435
Merged
Merged
Deepanshutr/chore #435
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The test cases in several query modules have been refactored. The order, meta, asset, and maintainer modules now use keys instead of IDs for test cases. This involves updating the relevant fields and test data. The change enhances code consistency and test coverage for the application.
This commit adds a new function GenerateUniqueIdentifierList in the utilities module. The function generates a list of unique IDs with a given prefix and count, which can be used for testing and client utility purposes.
Added error handling for the auxiliary module and expanded test coverage for better integrity checking and robustness. Improved tests in the helpers/base package, especially for auxiliaries and cli_flag. Updated error handling and validations for auxiliary initializations and operations to prevent panics and ensure data integrity.
…unctions in transaction_keeper_test.go The changes involve updating import paths to retrieve necessary modules like orders, identities, metas, classifications, and dependencies like cosmos-sdk or IBC modules from github. The transaction_keeper test has major enhancements which mainly revolve around creating a more comprehensive test setup as well as updating the parameters for wrapping transactions.
Instead of directly returning the error in ValidateBasic function, the error messages are now wrapped with details for better debugging. This change mainly affects the error handling mechanism within the sdkTypes.AccAddressFromBech32, FromID.ValidateBasic, and Coins.Validate functions, and also refines the coins length error message.
The update adds various new test cases to the ValidateBasic method in message_test.go. These cover scenarios like multiple coins, duplicate denom, and an excessive number of coins. New invalid request errors have been added to handle incorrect from address, from id, coin amount and coin denom.
Instead of directly returning the error in ValidateBasic function, the error messages are now wrapped with details for better debugging. This change mainly affects the error handling mechanism within the sdkTypes.AccAddressFromBech32, FromID.ValidateBasic, and Coins.Validate functions, and also refines the coins length error message.
The update adds various new test cases to the ValidateBasic method in message_test.go. These cover scenarios like multiple coins, duplicate denom, and an excessive number of coins. New invalid request errors have been added to handle incorrect from address, from id, coin amount and coin denom.
Instead of directly returning the error in ValidateBasic function, the error messages are now wrapped with details for better debugging. This change mainly affects the error handling mechanism within the sdkTypes.AccAddressFromBech32, FromID.ValidateBasic, and Coins.Validate functions, and also refines the coins length error message.
Expanded message_test.go with various test cases that cover scenarios for validating basic Message fields, including address, ID, asset, and value. These tests ensure that the correct error handling occurs for all possible cases in the validation process.
This update replaces usage of generic error messages in message validation methods of wrap, unwrap, and send transactions. These have been replaced with custom errors for invalid situations such as incorrect address, invalid id, etc. This provides more clear debugging information and improves error tracking.
…alidMessage" The error name "IncorrectMessage" has been refactored to "InvalidMessage" throughout the codebase to better reflect its meaning. This change affects all modules and tests where this error name is used, improving code clarity and consistency.
improving error message
The validation in transfer's auxiliaryRequest struct has been updated to use ValidateBasic() function rather than using govalidator. This change provides a more specific validation ensuring the IDs are valid and the value is greater than zero.
The validation process in the mint auxiliary request class of the x splits module was revamped. Instead of using the 'govalidator' package for validation, each attribute is now individually validated using 'ValidateBasic' method and error messages are handled more precisely.
The test method Test_auxiliaryRequestFromInterface has been removed from the mint auxiliary request test file in the x splits module. This change simplifies the test structure and streamlines the module by eliminating unnecessary testing of auxiliaryRequestFromInterface function.
Revised auxiliary tests in the mint module of the x splits package. Unnecessary test cases have been removed, including testing of auxiliaryRequestFromInterface function. Also, new test scenarios were added for improved code coverage and validity checks. The helper function "createTestInput" was removed and replaced with global variables for better readability and consistency.
Refactored the Help function in the mint module's auxiliary helper to enhance input validation and error handling. It now validates the AuxiliaryRequest explicitly and returns custom error for invalid request type. This update ensures more robust code execution and improved debugging capability.
This commit removes the 'Test_auxiliaryRequestFromInterface' function from the 'auxiliary_request_test.go' file. The test was deemed unnecessary and not contributing any value to the testing suite.
This commit replaces the govalidator usage for auxiliaryRequest validation with custom error checking. It also removes unnecessary `valid` struct tags and enhances error messages. Now validation checks for specifics: the validity of both owner ids, asset ids and makes sure that value is greater than zero.
This commit refactors the process of validation in auxiliaryRequest and its corresponding test cases. The update replaces the use of govalidator with custom error checking, removes unnecessary 'valid' struct tags, and enhances the clarity of error messages. The validation now specifically checks the validity of the owner and asset IDs, and ensures that the value is greater than zero.
The updated code includes enhanced validation processes in the auxiliary request function, now using custom error checking. It ensures the validity of the owner and asset IDs and checks that the value is greater than zero. It also offers improved error messages by replacing govalidator, removing unnecessary 'valid' struct tags and therefore making the overall testing more concise and clear.
Quality Gate failedFailed conditions |
deepanshutr
commented
Apr 15, 2024
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.
self reviewed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.