From 0e51991aaae85893affa3457e9b63756138c318e Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Mon, 20 Mar 2017 08:58:28 -0500 Subject: [PATCH] Skip jsonb test if no jsonb type --- jsonb_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/jsonb_test.go b/jsonb_test.go index 3978b0d4..91637eb8 100644 --- a/jsonb_test.go +++ b/jsonb_test.go @@ -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},