Skip to content

🧪 implement missing tests for SubmoduleEntry::is_remote#42

Merged
bashandbone merged 1 commit intomainfrom
testing-improvement-is-remote-2191209411888295874
Mar 22, 2026
Merged

🧪 implement missing tests for SubmoduleEntry::is_remote#42
bashandbone merged 1 commit intomainfrom
testing-improvement-is-remote-2191209411888295874

Conversation

@bashandbone
Copy link
Copy Markdown
Owner

The testing gap for SubmoduleEntry::is_remote in src/config.rs has been addressed by enhancing existing unit tests and adding a new integration-style test.

🎯 What: The testing gap addressed: is_remote method was missing comprehensive tests for edge cases and verification through the main Config struct.
📊 Coverage:

  • Added an assertion to test_entry_is_remote to verify that a path containing but not starting with a protocol (e.g., '/path/to/https://repo') returns false.
  • Added an assertion to test_entry_is_remote to verify that a minimal protocol string (e.g., "https://") returns true.
  • Added a new test function test_config_submodule_remote_check that creates a Config instance, adds a SubmoduleEntry with an https URL, and asserts that is_remote() returns true for 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

- 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>
Copilot AI review requested due to automatic review settings March 22, 2026 20:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_remote with additional edge-case assertions (protocol substring not at start; minimal protocol string).
  • Add test_config_submodule_remote_check to validate is_remote() through Config storage/retrieval.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/config.rs 80.98% <100.00%> (+0.28%) ⬆️

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bashandbone bashandbone merged commit 30e3834 into main Mar 22, 2026
12 checks passed
@bashandbone bashandbone deleted the testing-improvement-is-remote-2191209411888295874 branch March 22, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants