diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-07-20 20:52:42 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-07-20 20:52:42 +0100 |
commit | 341f0bd5dfd640a0adf7cceb61fabeab7e2cebb1 (patch) | |
tree | e7c2bbe4d166ce34fcf556cf146748a4b97fd4a9 /pkg/db/setup_test.go | |
parent | c7766d087d6cdd691e60f4b2d317030543209c08 (diff) |
wired up to main but setup not yet right - need proper config setup
Diffstat (limited to '')
-rw-r--r-- | pkg/db/setup_test.go | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/pkg/db/setup_test.go b/pkg/db/setup_test.go index 3787d2e..a8868ed 100644 --- a/pkg/db/setup_test.go +++ b/pkg/db/setup_test.go @@ -54,13 +54,16 @@ func TestOpenSQLiteFile(t *testing.T) { // tx.Commit() func TestDatamapGoesIntoDB(t *testing.T) { - db, err := SetupDB("./testdata/test.db") // we set up, then just open it. - defer db.Close() + // db, err := SetupDB("./testdata/test.db") // we set up, then just open it. + // defer db.Close() + // if err != nil { + // t.Fatal("Expected to be able to set up the database.") + // } + d, err := reader.ReadDML("./testdata/datamap.csv") if err != nil { - t.Fatal("Expected to be able to set up the database.") + t.Fatal(err) } - d, _ := reader.ReadDML("./testdata/datamap.csv") - err = DatamapToDB(d, db, "First Datamap") + err = DatamapToDB(d, "First Datamap", "./testdata/test.db") if err != nil { t.Errorf("Unable to write datamap to database file because %v.", err) } |