2
0

Make pgtype test compat with CockroachDB when possible

This commit is contained in:
Jack Christensen
2022-03-22 20:31:00 -05:00
parent 210ebb4a50
commit e04b35bfcb
20 changed files with 73 additions and 1 deletions
+6
View File
@@ -71,6 +71,8 @@ func mustParseNumeric(t *testing.T, src string) pgtype.Numeric {
}
func TestNumericCodec(t *testing.T) {
skipCockroachDB(t, "server formats numeric text format differently")
max := new(big.Int).Exp(big.NewInt(10), big.NewInt(147454), nil)
max.Add(max, big.NewInt(1))
longestNumeric := pgtype.Numeric{Int: max, Exp: -16383, Valid: true}
@@ -143,6 +145,8 @@ func TestNumericFloat64Valuer(t *testing.T) {
}
func TestNumericCodecFuzz(t *testing.T) {
skipCockroachDB(t, "server formats numeric text format differently")
r := rand.New(rand.NewSource(0))
max := &big.Int{}
max.SetString("9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999", 10)
@@ -166,6 +170,8 @@ func TestNumericCodecFuzz(t *testing.T) {
}
func TestNumericMarshalJSON(t *testing.T) {
skipCockroachDB(t, "server formats numeric text format differently")
conn := testutil.MustConnectPgx(t)
defer testutil.MustCloseContext(t, conn)