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.
This pull request introduces comprehensive integration tests for the
BitCheckApplication, covering its main operations and validating command-line behaviors and error handling. The tests are organized by operation and ensure correct functionality, proper error reporting, and correct handling of edge cases for add, check, delete, info, and list modes. Additionally, a shared test base class is introduced to provide common setup, teardown, and helper methods for all tests.Test Infrastructure Improvements:
ApplicationTestBase, an abstract base class that provides common setup, teardown, and aRunApphelper method for running the application in a controlled test environment. This simplifies and unifies the structure of all operation tests.Operation-Specific Integration Tests:
Add Operation Tests:
AddOperationTeststo verify that files are only added when the--addoption is enabled, existing files are skipped or checked appropriately, and hashes remain unchanged unless required.Check Operation Tests:
CheckOperationTeststo ensure that running the check operation on missing files does not remove their entries from the database when update is not requested.Delete Operation Tests:
DeleteOperationTeststo confirm that invalid combinations of the--deleteflag with other options or missing required arguments produce appropriate error messages.Info Mode Tests:
InfoModeTeststo validate that info mode displays correct file tracking details, handles untracked files, enforces required arguments, and rejects invalid option combinations.List Mode Tests:
ListModeTeststo check that list mode correctly displays tracked and missing files, enforces argument requirements, and cannot be combined with other operations.