MCPcopy Create free account
hub / github.com/PostHog/duckgres / TestHandleCopyOutLogsSyntaxError

Function TestHandleCopyOutLogsSyntaxError

server/conn_querylog_feedback_test.go:130–149  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

128 t.Fatalf("expected exception entry type, got %q", entry.Type)
129 }
130 default:
131 t.Fatal("expected query log entry for missing cursor error")
132 }
133}
134
135func TestHandleCopyOutLogsSyntaxError(t *testing.T) {
136 c, ql, cleanup := newFeedbackClientConn(t)
137 defer cleanup()
138
139 if err := c.handleCopyOut("COPY TO STDOUT", "COPY TO STDOUT"); err != nil {
140 t.Fatalf("handleCopyOut returned error: %v", err)
141 }
142
143 select {
144 case entry := <-ql.ch:
145 if entry.ExceptionCode != "42601" {
146 t.Fatalf("expected exception code 42601, got %q", entry.ExceptionCode)
147 }
148 if entry.Type != "ExceptionWhileProcessing" {
149 t.Fatalf("expected exception entry type, got %q", entry.Type)
150 }
151 default:
152 t.Fatal("expected query log entry for COPY syntax error")

Callers

nothing calls this directly

Calls 2

newFeedbackClientConnFunction · 0.85
handleCopyOutMethod · 0.80

Tested by

no test coverage detected