From 1814f51e0dc1a84552acca4bc16ae95333e49ea6 Mon Sep 17 00:00:00 2001 From: Jim Lambert Date: Tue, 18 Feb 2020 16:09:37 -0500 Subject: [PATCH] not needed --- dialects/oci8/connection_test.go | 34 -------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 dialects/oci8/connection_test.go diff --git a/dialects/oci8/connection_test.go b/dialects/oci8/connection_test.go deleted file mode 100644 index e51e4149..00000000 --- a/dialects/oci8/connection_test.go +++ /dev/null @@ -1,34 +0,0 @@ -package oci8 - -import ( - "os" - "testing" - - "github.com/jinzhu/gorm" -) - -func Test_Connection(t *testing.T) { - dbDSN := os.Getenv("GORM_DSN") - if dbDSN == "" { - dbDSN = "gorm/gorm@localhost:1521/XEPDB1" - } - gDB, err := gorm.Open("oci8", dbDSN) - if err != nil { - t.Errorf("connection error: %s", err.Error()) - } - db := gDB.DB() - q := "select sysdate from dual" - rows, err := db.Query(q) - if err != nil { - t.Errorf("query error: %s", err.Error()) - } - defer rows.Close() - var thedate string - for rows.Next() { - err := rows.Scan(&thedate) - if err != nil { - t.Errorf("scan error: %s", err.Error()) - } - } - t.Logf("The date is: %s\n", thedate) -}