From b0146a5a7608811e94b837dc0b5fe964e771d078 Mon Sep 17 00:00:00 2001 From: Dan Sosedoff Date: Tue, 30 Jan 2018 22:41:12 -0600 Subject: [PATCH] Update test case to handle the constraint result rows --- pkg/client/client_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/client/client_test.go b/pkg/client/client_test.go index 1efd53c..79c985d 100644 --- a/pkg/client/client_test.go +++ b/pkg/client/client_test.go @@ -266,8 +266,9 @@ func test_TableConstraints(t *testing.T) { res, err := testClient.TableConstraints("editions") assert.Equal(t, nil, err) - assert.Equal(t, 1, len(res.Columns)) - assert.Equal(t, 2, len(res.Rows)) + assert.Equal(t, []string{"name", "definition"}, res.Columns) + assert.Equal(t, Row{"pkey", "PRIMARY KEY (isbn)"}, res.Rows[0]) + assert.Equal(t, Row{"integrity", "CHECK (book_id IS NOT NULL AND edition IS NOT NULL)"}, res.Rows[1]) } func test_Query(t *testing.T) {