Skip jsonb test if no jsonb type

non-blocking
Jack Christensen 2017-03-20 08:58:28 -05:00
parent 4645475800
commit 0e51991aaa
1 changed files with 6 additions and 0 deletions

View File

@ -9,6 +9,12 @@ import (
)
func TestJsonbTranscode(t *testing.T) {
conn := mustConnectPgx(t)
defer mustClose(t, conn)
if _, ok := conn.ConnInfo.DataTypeForName("jsonb"); !ok {
t.Skip("Skipping due to no jsonb type")
}
testSuccessfulTranscode(t, "jsonb", []interface{}{
pgtype.Jsonb{Bytes: []byte("{}"), Status: pgtype.Present},
pgtype.Jsonb{Bytes: []byte("null"), Status: pgtype.Present},