(t *testing.T)
| 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 | |
| 135 | func 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") |
nothing calls this directly
no test coverage detected