mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-26 22:30:11 +00:00
* refactor: separate OTLP HTTP decoding from trace codec * feat: complete trace ingestion and read paths * fix: encode OTLP protobuf errors in Rust * fix: raise OTLP body limit to 16 MiB * test: cover OTLP auth body parsing boundary * refactor: parse OTLP media type into enum * fix: enforce OTLP body size at HTTP boundary * perf: preserve shared OTLP metadata across ingestion * bench: compare owned and shared trace resource fanout * refactor: extract shared storage and Python conversion caches * refactor: keep shared storage owned by traces * test: keep trace loopback coverage in Rust * test(proxy): adapt trace coverage to injected access context * fix(tracing): satisfy stacked branch lint checks * refactor(tracing): use immutable ingestion payloads * fix(tracing): declare native error encoder export * test(proxy): resolve trace access through dependency * fix(tracing): align merged normalizer types and bridge tests * fix(tracing): address ingestion and diagnostic review findings * fix(proxy): preserve body parsing for partial request scopes * test(proxy): use valid HTTP scopes in request fixtures * test(proxy): complete auth request flow scopes
23 lines
717 B
Rust
23 lines
717 B
Rust
use litellm_traces::Shared;
|
|
use rstest::rstest;
|
|
|
|
#[rstest]
|
|
fn clones_preserve_values_and_serialize_transparently() {
|
|
let original = Shared::new(vec!["value".to_owned()]);
|
|
let cloned = original.clone();
|
|
assert_eq!(cloned.as_ref(), original.as_ref());
|
|
assert_eq!(
|
|
serde_json::to_value(&cloned).unwrap(),
|
|
serde_json::json!(["value"])
|
|
);
|
|
}
|
|
|
|
#[rstest]
|
|
fn clones_share_storage_without_merging_equal_values() {
|
|
let original = Shared::new("value".to_owned());
|
|
let cloned = original.clone();
|
|
let equal = Shared::new("value".to_owned());
|
|
assert!(original.shares_storage_with(&cloned));
|
|
assert!(!original.shares_storage_with(&equal));
|
|
assert_eq!(*original, *equal);
|
|
}
|