mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-15 09:12:18 +00:00
test(otel v2): drop narrating docstrings from the langfuse routing tests
This commit is contained in:
parent
6b4698511a
commit
451de0ace2
1 changed files with 0 additions and 18 deletions
|
|
@ -686,12 +686,6 @@ LANGFUSE_CREDS = {"langfuse_public_key": "pk", "langfuse_secret_key": "sk"}
|
|||
|
||||
|
||||
def test_langfuse_dynamic_endpoint_follows_the_key_host():
|
||||
"""A key that names its own Langfuse host must move the export destination.
|
||||
|
||||
Without this the preset swapped the key's credentials in and left the exporter
|
||||
aimed at the process-wide env host, so a tenant's spans were POSTed to the
|
||||
operator's Langfuse signed with keys that host does not know.
|
||||
"""
|
||||
assert (
|
||||
dynamic_otlp_endpoint(
|
||||
"langfuse_otel", {**LANGFUSE_CREDS, "langfuse_host": "http://team-b-langfuse:3100"}
|
||||
|
|
@ -708,8 +702,6 @@ def test_langfuse_dynamic_endpoint_normalizes_a_bare_host():
|
|||
|
||||
|
||||
def test_langfuse_dynamic_endpoint_is_none_without_a_host():
|
||||
# No host on the key means "do not move the destination": the preset's
|
||||
# env-resolved endpoint stands, matching V1's fallback to the env host.
|
||||
assert dynamic_otlp_endpoint("langfuse_otel", LANGFUSE_CREDS) is None
|
||||
|
||||
|
||||
|
|
@ -722,18 +714,10 @@ def test_langfuse_dynamic_endpoint_is_none_without_a_host():
|
|||
],
|
||||
)
|
||||
def test_langfuse_dynamic_endpoint_is_none_without_the_key_pair(partial):
|
||||
"""A host without both keys must not move the destination.
|
||||
|
||||
The headers builder needs both keys, so a host on its own would leave the
|
||||
exporter carrying the operator's env-derived Authorization header while
|
||||
pointing it at the caller's host. V1 returns None in the same state.
|
||||
"""
|
||||
assert dynamic_otlp_endpoint("langfuse_otel", {**partial, "langfuse_host": "attacker.example.com"}) is None
|
||||
|
||||
|
||||
def test_operator_credentials_stay_on_the_operator_endpoint():
|
||||
"""A team that sets only a host, and reaches routing via its service name,
|
||||
must not redirect the exporter that still carries the operator's header."""
|
||||
cache = _cache(
|
||||
"langfuse_otel",
|
||||
exporters=[
|
||||
|
|
@ -759,8 +743,6 @@ def test_operator_credentials_stay_on_the_operator_endpoint():
|
|||
|
||||
|
||||
def test_langfuse_host_stamped_onto_owned_exporter_only():
|
||||
"""A Langfuse key's host must never repoint a co-configured exporter owned by
|
||||
a different backend."""
|
||||
cache = _cache(
|
||||
"langfuse_otel",
|
||||
exporters=[
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue