Skip to content

Commit 1779daf

Browse files
fix: Resolve Gate 5 test failure in discovery module
- Fix test_discover_models_nonexistent_paths to use empty discovery without default paths - Use temp directory path to ensure nonexistent path on all platforms - Prevents discovery from finding models in default home directories during test - All 220 tests now pass, unblocking Gate 5 (Test Suite Validation) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 1a0fa2d commit 1779daf

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/discovery.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,16 @@ mod tests {
277277

278278
#[test]
279279
fn test_discover_models_nonexistent_paths() {
280-
let mut discovery = ModelDiscovery::new();
281-
discovery.add_search_path(PathBuf::from("/nonexistent/path"));
280+
// Create discovery without default paths
281+
let mut discovery = ModelDiscovery {
282+
search_paths: Vec::new(),
283+
};
284+
285+
// Add a path that definitely doesn't exist
286+
use std::env;
287+
let temp_dir = env::temp_dir();
288+
let nonexistent_path = temp_dir.join("nonexistent_shimmy_test_dir_12345");
289+
discovery.add_search_path(nonexistent_path);
282290

283291
let models = discovery.discover_models().unwrap();
284292
assert_eq!(models.len(), 0);

0 commit comments

Comments
 (0)