aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-07-23 21:03:51 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-07-23 21:03:51 +0100
commit576f3ce5353e1e8064959cb4c61f80a78a988a6f (patch)
tree8941c715714934327138f597ef87315add3ded13 /pkg
parent4c8294bcbeb45ce93a74ad963a346cf69ccbc398 (diff)
tests passing
Diffstat (limited to 'pkg')
-rw-r--r--pkg/datamaps/db_test.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkg/datamaps/db_test.go b/pkg/datamaps/db_test.go
index 029121c..a9988d1 100644
--- a/pkg/datamaps/db_test.go
+++ b/pkg/datamaps/db_test.go
@@ -30,12 +30,17 @@ func TestOpenSQLiteFile(t *testing.T) {
}
func TestDatamapGoesIntoDB(t *testing.T) {
+ db, err := SetupDB("./testdata/test.db")
+ defer db.Close()
+ if err != nil {
+ t.Fatal("Expected to be able to set up the database.")
+ }
opts := Options{
DBPath: "./testdata/test.db",
DMName: "First Datamap",
+ DMPath: "./testdata/datamap.csv",
}
- err := DatamapToDB(&opts)
- if err != nil {
+ if err := DatamapToDB(&opts); err != nil {
t.Errorf("Unable to write datamap to database file because %v.", err)
}
}