🧪 implement missing tests for SubmoduleEntry::is_remote#42
Merged
bashandbone merged 1 commit intomainfrom Mar 22, 2026
Merged
Conversation
- Updated `test_entry_is_remote` in `src/config.rs` with additional edge cases:
- Verifying that a protocol not at the start of the URL string returns false.
- Verifying that a minimal protocol string (e.g., "https://") returns true.
- Added `test_config_submodule_remote_check` to `src/config.rs` to verify remote status on entries added to a `Config` struct.
Addresses the missing testing gap for `is_remote` as specified in the task.
Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds missing/expanded test coverage for SubmoduleEntry::is_remote in src/config.rs, including additional edge cases and a check that the behavior is preserved when entries are accessed via Config.
Changes:
- Extend
test_entry_is_remotewith additional edge-case assertions (protocol substring not at start; minimal protocol string). - Add
test_config_submodule_remote_checkto validateis_remote()throughConfigstorage/retrieval.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 6 files with indirect coverage changes 🚀 New features to boost your workflow:
|
This file contains hidden or 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
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.
The testing gap for
SubmoduleEntry::is_remoteinsrc/config.rshas been addressed by enhancing existing unit tests and adding a new integration-style test.🎯 What: The testing gap addressed:
is_remotemethod was missing comprehensive tests for edge cases and verification through the mainConfigstruct.📊 Coverage:
test_entry_is_remoteto verify that a path containing but not starting with a protocol (e.g.,'/path/to/https://repo') returnsfalse.test_entry_is_remoteto verify that a minimal protocol string (e.g.,"https://") returnstrue.test_config_submodule_remote_checkthat creates aConfiginstance, adds aSubmoduleEntrywith anhttpsURL, and asserts thatis_remote()returnstruefor that entry retrieved from the config.✨ Result: Improved test coverage for submodule remote identification logic, ensuring robustness against malformed URLs and correct integration with the project's main configuration structure.
PR created automatically by Jules for task 2191209411888295874 started by @bashandbone