aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/datamaps/db_test.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--pkg/datamaps/db_test.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/pkg/datamaps/db_test.go b/pkg/datamaps/db_test.go
index 2055d8a..3ca9054 100644
--- a/pkg/datamaps/db_test.go
+++ b/pkg/datamaps/db_test.go
@@ -1,12 +1,16 @@
package datamaps
import (
+ "os"
"testing"
)
func TestOpenSQLiteFile(t *testing.T) {
db, err := setupDB("./testdata/test.db")
- defer db.Close()
+ defer func() {
+ db.Close()
+ os.Remove("./testdata/test.db")
+ }()
if err != nil {
t.Fatal("Expected to be able to set up the database.")
@@ -38,7 +42,10 @@ func TestOpenSQLiteFile(t *testing.T) {
func TestDatamapGoesIntoDB(t *testing.T) {
db, err := setupDB("./testdata/test.db")
- defer db.Close()
+ defer func() {
+ db.Close()
+ os.Remove("./testdata/test.db")
+ }()
if err != nil {
t.Fatal("Expected to be able to set up the database.")