diff options
Diffstat (limited to 'reader/reader_test.go')
-rw-r--r-- | reader/reader_test.go | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/reader/reader_test.go b/reader/reader_test.go index 0335b03..ca886bc 100644 --- a/reader/reader_test.go +++ b/reader/reader_test.go @@ -1,37 +1,9 @@ package reader import ( - "fmt" "testing" ) -func TestOpenSQLiteFile(t *testing.T) { - // db, err := sql.Open("sqlite3", "testdata/test.db") - db, err := SetupDB("testdata/test.db") - defer db.Close() - if err != nil { - t.Fatal("Expected to be able to set up the database.") - } - stmt := `insert into datamap(id, name) values(1,'cock')` - _, err = db.Exec(stmt) - if err != nil { - t.Errorf("Cannot add record to db") - } - rows, err := db.Query("select name from datamap") - if err != nil { - t.Errorf("Cannot run select statement") - } - defer rows.Close() - for rows.Next() { - var name string - err = rows.Scan(&name) - if err != nil { - t.Errorf("Cannot scan resulting row") - } - fmt.Println(name) - } -} - func TestReadDML(t *testing.T) { d, _ := ReadDML("testdata/datamap.csv") cases := []struct { |