Skip to content

Commit 409550e

Browse files
committed
test(observability-proxy): pin gzip on non-tail log requests
Only tails opt out of the transport's gzip negotiation; bounded requests keep it on purpose. Assert that side too, so a change that applies identity to every request fails a test instead of silently dropping compression between the proxy and the store. Assisted-by: LLM Signed-off-by: ZverGuy <[email protected]>
1 parent c00d0b5 commit 409550e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎internal/observabilityproxy/server_test.go‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,11 @@ func TestServerTailHeadersBeforeFirstLine(t *testing.T) {
394394
case <-time.After(2 * time.Second):
395395
t.Fatal("tail response headers did not reach the client before the first line")
396396
}
397-
if ae := h.requests()[0].headers.Get("Accept-Encoding"); ae != "identity" {
397+
reqs := h.requests()
398+
if len(reqs) != 1 {
399+
t.Fatalf("upstream saw %d requests, want 1", len(reqs))
400+
}
401+
if ae := reqs[0].headers.Get("Accept-Encoding"); ae != "identity" {
398402
t.Fatalf("upstream tail Accept-Encoding = %q, want identity", ae)
399403
}
400404
}

0 commit comments

Comments
 (0)