summaryrefslogtreecommitdiff
path: root/internal/llm/openai_sse_negative_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-09-06 10:25:36 +0300
committerPaul Buetow <paul@buetow.org>2025-09-06 10:25:36 +0300
commit5be9532cfa630f4aacd8d879c3e4f5cc316da0fa (patch)
tree0a901680fccd1e2703ffdbd9284ccff932be1d67 /internal/llm/openai_sse_negative_test.go
parent70f1d0e78c57dfa5beae779b3d392b6e6fa44c14 (diff)
feat(lsp): configurable inline/chat triggers; switch inline markers to >text>/>>text>; update docs and example config; tests updated to new triggers and raise LSP coverage to >=85%; chore: remove semicolon legacy; chore(mage): auto-refresh coverage daily if docs/coverage.out is older than 24h
Diffstat (limited to 'internal/llm/openai_sse_negative_test.go')
-rw-r--r--internal/llm/openai_sse_negative_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/llm/openai_sse_negative_test.go b/internal/llm/openai_sse_negative_test.go
index 22b938c..8da5526 100644
--- a/internal/llm/openai_sse_negative_test.go
+++ b/internal/llm/openai_sse_negative_test.go
@@ -6,9 +6,11 @@ import (
"net/http"
"net/http/httptest"
"testing"
+ "os"
)
func TestOpenAI_ChatStream_SSE_MalformedChunk(t *testing.T) {
+ if os.Getenv("HEXAI_TEST_SKIP_NET") == "1" { t.Skip("skip network-bound tests in restricted environments") }
// Malformed JSON chunk should be skipped; no onDelta calls; no error.
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/event-stream")
@@ -24,4 +26,3 @@ func TestOpenAI_ChatStream_SSE_MalformedChunk(t *testing.T) {
}
if got != "" { t.Fatalf("expected no deltas for malformed chunk, got %q", got) }
}
-