Tweak test for PG 12 compatibility

pull/657/head
Jack Christensen 2019-12-23 11:06:27 -06:00
parent 2f2e01b9fc
commit eb360b07be
1 changed files with 2 additions and 2 deletions

View File

@ -13,12 +13,12 @@ import (
"time"
"github.com/cockroachdb/apd"
"github.com/gofrs/uuid"
"github.com/jackc/pgconn"
"github.com/jackc/pgconn/stmtcache"
"github.com/jackc/pgtype"
gofrs "github.com/jackc/pgtype/ext/gofrs-uuid"
"github.com/jackc/pgx/v4"
"github.com/gofrs/uuid"
"github.com/shopspring/decimal"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@ -582,7 +582,7 @@ func TestQueryEncodeError(t *testing.T) {
if rows.Err() == nil {
t.Error("Expected rows.Err() to return error, but it didn't")
}
if rows.Err().Error() != `ERROR: invalid input syntax for integer: "wrong" (SQLSTATE 22P02)` {
if !strings.Contains(rows.Err().Error(), "SQLSTATE 22P02") {
t.Error("Expected rows.Err() to return different error:", rows.Err())
}
}