fix(litellm): gate tests on server feature to fix cargo test --features web
Some checks failed
CI / Format (push) Successful in 3s
CI / Clippy (push) Successful in 2m56s
CI / Security Audit (push) Successful in 1m47s
CI / Tests (push) Successful in 4m4s
CI / Deploy (push) Successful in 4s
CI / E2E Tests (push) Failing after 30s

The litellm test module uses server-only structs (ActivityModelEntry,
SpendModelEntry) that are behind #[cfg(feature = "server")]. Gate the
test module with #[cfg(all(test, feature = "server"))] so
cargo test --features web compiles without errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Sharang Parnerkar
2026-02-26 21:11:12 +01:00
parent fe4f8e84ae
commit c9c5970971

View File

@@ -292,7 +292,7 @@ pub async fn get_litellm_usage(
}) })
} }
#[cfg(test)] #[cfg(all(test, feature = "server"))]
mod tests { mod tests {
use super::*; use super::*;