From fcf28d130aa6a89f54f107ffcfb79b5ccb37890d Mon Sep 17 00:00:00 2001 From: Jim Lambert Date: Fri, 14 Feb 2020 15:21:45 -0500 Subject: [PATCH] remove dep on matryer/is --- dialects/oci8/connection_test.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/dialects/oci8/connection_test.go b/dialects/oci8/connection_test.go index d4c65ac2..e51e4149 100644 --- a/dialects/oci8/connection_test.go +++ b/dialects/oci8/connection_test.go @@ -5,26 +5,30 @@ import ( "testing" "github.com/jinzhu/gorm" - "github.com/matryer/is" ) func Test_Connection(t *testing.T) { - is := is.New(t) dbDSN := os.Getenv("GORM_DSN") if dbDSN == "" { dbDSN = "gorm/gorm@localhost:1521/XEPDB1" } gDB, err := gorm.Open("oci8", dbDSN) - is.NoErr(err) + if err != nil { + t.Errorf("connection error: %s", err.Error()) + } db := gDB.DB() q := "select sysdate from dual" rows, err := db.Query(q) - is.NoErr(err) + if err != nil { + t.Errorf("query error: %s", err.Error()) + } defer rows.Close() var thedate string for rows.Next() { err := rows.Scan(&thedate) - is.NoErr(err) + if err != nil { + t.Errorf("scan error: %s", err.Error()) + } } t.Logf("The date is: %s\n", thedate) }