Fix failing tests by addressing design philosophy violations#1
Merged
bashandbone merged 2 commits intomainfrom Jun 22, 2025
Merged
Conversation
- Remove all direct filesystem operations from gitoxide_manager.rs - Implement proper fallback chain: gitoxide -> git2 -> CLI - Clean up existing submodule state using git commands only - Simplify test harness to use git commands instead of filesystem ops - Remove unused clone methods and cleanup functions - Fix method name references and compilation errors Progress: 6 tests passing, 8 failing (down from 14 failing) Main remaining issue: test remote repository setup needs proper branch initialization
Owner
|
merging test fixes
|
Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com>
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.
Summary
This PR addresses the failing tests by fixing fundamental design philosophy violations in the codebase. The main issue was that the library was performing direct filesystem operations instead of using git tools (gitoxide, git2, or CLI) as intended.
Key Changes
🏗️ Design Philosophy Compliance
src/gitoxide_manager.rsstd::fs::remove_dir_all🔧 Core Implementation Fixes
add_submodulemethod to follow the fallback patternclone_with_gix,clone_with_cli, cleanup helpers)🧪 Test Harness Improvements
git submodule deinit --all -fandgit clean -fdxProgress
✅ 6 tests now passing (up from 0)
❌ 8 tests still failing (down from 14)
Passing Tests:
test_check_command_with_empty_configtest_check_command_with_no_configtest_custom_config_filetest_config_with_defaultstest_error_handling_invalid_git_repotest_error_handling_invalid_urlRemaining Issues:
The remaining 8 failing tests all have the same root cause: test remote repository setup. The error
"fatal: 'lib/test' does not have a commit checked out"indicates that the test remote repositories are being created as empty repositories without proper branch initialization.Next Steps
The remaining work involves:
Files Modified
src/gitoxide_manager.rs- Core implementation fixestests/common/mod.rs- Test harness improvementsThis represents significant progress toward a clean, philosophy-compliant implementation that properly uses git tools instead of direct filesystem operations.
💻 View my work • About Codegen