Skip to content

Commit a82164f

Browse files
chore: purge 4 dead test files, trim 3 more of dead/slow tests
Delete 4 test files (507 lines): - release_gate_integration.rs: tests old release gate system that was replaced (caused known CI failures) - apple_silicon_detection_test.rs: all 4 tests gated behind cfg(mlx) — MLX is empty [] stub, zero tests ever compiled - gpu_backend_tests.rs + gpu_layer_verification.rs: all 11 tests identical ShimmyUniversalEngine::new() no-ops, no assertions Trim 3 test files (133 lines removed): - regression_tests.rs: removed dead no-op tests for MLX (#114) and GPU metrics (#111) - anthropic_api_integration_test.rs: removed test that ran cargo build as subprocess (slow, redundant with CI) - integration_tests.rs: removed 3 #[ignore] no-op tests All 665 tests pass locally, format clean.
1 parent 6081c90 commit a82164f

7 files changed

Lines changed: 0 additions & 611 deletions

tests/anthropic_api_integration_test.rs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,6 @@
33
/// This test suite ensures shimmy can serve as a drop-in replacement for
44
/// Anthropic's Claude API, enabling tools like Claude Code to work in local networks.
55
use serde_json::json;
6-
use std::process::Command;
7-
8-
#[test]
9-
fn test_anthropic_api_endpoint_exists() {
10-
// Regression test for Issue #109 - Anthropic API format support
11-
12-
// Build shimmy to ensure anthropic_compat module compiles
13-
let output = Command::new("cargo")
14-
.args([
15-
"build",
16-
"--no-default-features",
17-
"--features",
18-
"huggingface",
19-
])
20-
.output()
21-
.expect("Failed to build shimmy with anthropic support");
22-
23-
assert!(
24-
output.status.success(),
25-
"Failed to build shimmy with Anthropic API support: {}",
26-
String::from_utf8_lossy(&output.stderr)
27-
);
28-
29-
// Check that the anthropic_compat module exists in the binary
30-
// We can't easily test the HTTP endpoint without starting the server,
31-
// but we can verify the module compiles and links correctly
32-
println!("✅ Anthropic API compatibility module compiles successfully");
33-
}
346

357
#[test]
368
fn test_anthropic_message_format_parsing() {

tests/apple_silicon_detection_test.rs

Lines changed: 0 additions & 116 deletions
This file was deleted.

tests/gpu_backend_tests.rs

Lines changed: 0 additions & 49 deletions
This file was deleted.

tests/gpu_layer_verification.rs

Lines changed: 0 additions & 53 deletions
This file was deleted.

tests/integration_tests.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,6 @@ async fn create_test_server() -> (String, tokio::task::JoinHandle<()>) {
3636
(base_url, handle)
3737
}
3838

39-
#[tokio::test]
40-
#[ignore] // Requires actual models and Python environment
41-
async fn test_huggingface_engine_integration() {
42-
// This test is disabled until HuggingFace engine is fully implemented
43-
// For now we test the interface exists
44-
println!("HuggingFace engine test skipped - feature under development");
45-
}
46-
4739
#[tokio::test]
4840
async fn test_http_api_health_check() {
4941
let (base_url, server_handle) = create_test_server().await;
@@ -68,22 +60,6 @@ async fn test_http_api_health_check() {
6860
server_handle.abort();
6961
}
7062

71-
#[tokio::test]
72-
#[ignore] // Requires models to be available
73-
async fn test_api_generate_endpoint() {
74-
// This test is ignored because it would require actual models
75-
// Instead, we test the API structure in unit tests
76-
println!("API generate test skipped - requires actual models");
77-
}
78-
79-
#[tokio::test]
80-
#[ignore] // Requires WebSocket support
81-
async fn test_websocket_api() {
82-
// This test is ignored because it would require full server setup
83-
// WebSocket functionality is tested in unit tests
84-
println!("WebSocket test skipped - requires full server setup");
85-
}
86-
8763
#[test]
8864
fn test_cli_parsing() {
8965
use clap::Parser;

tests/regression_tests.rs

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -251,29 +251,6 @@ mod regression_tests {
251251
// Tests for user-reported issues to prevent regressions
252252
// ========================================
253253

254-
#[test]
255-
fn test_issue_111_gpu_metrics_endpoint() {
256-
// Test the fix for Issue #111 - GPU metrics missing from /metrics endpoint
257-
use shimmy::engine::adapter::InferenceEngineAdapter;
258-
use std::sync::Arc;
259-
260-
let registry = Registry::default();
261-
let engine = Box::new(InferenceEngineAdapter::new());
262-
let _state = Arc::new(shimmy::AppState::new(engine, registry));
263-
264-
// This should not panic and should include GPU fields
265-
// Note: We can't easily test the actual HTTP endpoint without starting a server
266-
// But we can test that the GPU detection functions work
267-
268-
// Test that GPU detection functions return valid boolean values
269-
// GPU detection functions executed without panicking (test passes if we reach here)
270-
271-
// In a real test environment, we would test:
272-
// 1. GET /metrics returns JSON with gpu_detected field
273-
// 2. gpu_vendor field is null or valid vendor string
274-
// 3. Fields are properly typed (boolean, string|null)
275-
}
276-
277254
#[test]
278255
fn test_issue_112_safetensors_engine_selection() {
279256
// Test the fix for Issue #112 - SafeTensors files should use SafeTensors engine
@@ -361,35 +338,6 @@ mod regression_tests {
361338
assert!(response_json.as_object().unwrap().contains_key("data"));
362339
}
363340

364-
#[test]
365-
fn test_issue_114_mlx_distribution_features() {
366-
// Test the fix for Issue #114 - MLX support in distribution pipeline
367-
368-
// Test that MLX feature is properly defined
369-
#[cfg(feature = "mlx")]
370-
{
371-
// MLX feature is enabled - test that MLX-related code compiles
372-
}
373-
374-
#[cfg(not(feature = "mlx"))]
375-
{
376-
// MLX feature is disabled - that's also valid
377-
}
378-
379-
// Test that Cargo.toml includes MLX feature definition
380-
let cargo_toml = include_str!("../Cargo.toml");
381-
assert!(
382-
cargo_toml.contains("mlx = []"),
383-
"MLX feature should be defined in Cargo.toml"
384-
);
385-
386-
// Test that Apple Silicon convenience feature includes MLX
387-
assert!(
388-
cargo_toml.contains("apple = ["),
389-
"Apple convenience feature should exist"
390-
);
391-
}
392-
393341
#[test]
394342
fn test_cli_model_dirs_option_compatibility() {
395343
// Test that CLI option doesn't break parsing

0 commit comments

Comments
 (0)