Skip to content

🧪 test: Add tests for GitmodulesConvert on SerializableIgnore#28

Merged
bashandbone merged 4 commits intomainfrom
add-serializable-ignore-tests-175858484778136430
Mar 14, 2026
Merged

🧪 test: Add tests for GitmodulesConvert on SerializableIgnore#28
bashandbone merged 4 commits intomainfrom
add-serializable-ignore-tests-175858484778136430

Conversation

@bashandbone
Copy link
Owner

🎯 What: The testing gap addressed
Missing unit tests for the GitmodulesConvert trait implementation on the SerializableIgnore enum in src/options.rs. This enum forms the core of parsing the ignore setting from git configuration.

📊 Coverage: What scenarios are now tested

  • Valid serialization of all enum variants (All, Dirty, Untracked, None, Unspecified) to their to_gitmodules representations.
  • Deserialization of all valid git config string and byte mappings via from_gitmodules and from_gitmodules_bytes.
  • Correct handling of invalid strings, different capitalizations, and invalid UTF-8 byte sequences.
  • Validation that gitmodules_key always returns "ignore".

Result: The improvement in test coverage
The SerializableIgnore configuration mapping now has full unit test coverage. This ensures that updates to the enum or git configuration behavior are caught by the test suite, increasing the overall reliability of submodule setting parsing.


PR created automatically by Jules for task 175858484778136430 started by @bashandbone

Added a `tests` module to `src/options.rs` to verify the `GitmodulesConvert`
trait implementation on the `SerializableIgnore` enum. This ensures all variants
correctly serialize to and deserialize from their respective git config string and
byte values.

Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 14, 2026 00:59
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copy link
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 unit tests for the GitmodulesConvert implementation of SerializableIgnore to close a configuration parsing/serialization coverage gap in src/options.rs.

Changes:

  • Added unit tests validating gitmodules_key() always returns "ignore".
  • Added unit tests covering to_gitmodules(), from_gitmodules(), and from_gitmodules_bytes() for all valid variants and invalid inputs (including invalid UTF-8).

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

google-labs-jules bot and others added 3 commits March 14, 2026 01:07
Added a `tests` module to `src/options.rs` to verify the `GitmodulesConvert`
trait implementation on the `SerializableIgnore` enum. This ensures all variants
correctly serialize to and deserialize from their respective git config string and
byte values.

Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com>
Added a `tests` module to `src/options.rs` to verify the `GitmodulesConvert`
trait implementation on the `SerializableIgnore` enum. This ensures all variants
correctly serialize to and deserialize from their respective git config string and
byte values.

Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com>
Added a `tests` module to `src/options.rs` to verify the `GitmodulesConvert`
trait implementation on the `SerializableIgnore` enum. This ensures all variants
correctly serialize to and deserialize from their respective git config string and
byte values.

Also fixed a flaky test `test_add_submodule_shallow` which was failing due to ambiguous branch resolution when cloning a shallow repository from a local path using the CLI fallback.

Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com>
@bashandbone bashandbone merged commit bf3d287 into main Mar 14, 2026
6 of 7 checks passed
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