MCPcopy
hub / github.com/jackc/pgx / TestConnQueryFailure

Function TestConnQueryFailure

stdlib/sql_test.go:475–481  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

473}
474
475func TestConnQueryFailure(t *testing.T) {
476 testWithAllQueryExecModes(t, func(t *testing.T, db *sql.DB) {
477 _, err := db.Query("select 'foo")
478 require.Error(t, err)
479 require.ErrorAs(t, err, new(*pgconn.PgError))
480 })
481}
482
483func TestConnSimpleSlicePassThrough(t *testing.T) {
484 testWithAllQueryExecModes(t, func(t *testing.T, db *sql.DB) {

Callers

nothing calls this directly

Calls 3

QueryMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected