Fix DB schema, write a basic unittest for the DB operations

This commit is contained in:
Arturo Filastò 2018-09-06 15:34:56 +02:00
commit a518ca79da
6 changed files with 183 additions and 124 deletions

View file

@ -13,6 +13,8 @@ func TestConnect(t *testing.T) {
if err != nil {
t.Error(err)
}
defer os.Remove(tmpfile.Name())
sess, err := Connect(tmpfile.Name())
if err != nil {
t.Error(err)
@ -27,5 +29,4 @@ func TestConnect(t *testing.T) {
log.Fatal("missing tables")
}
defer os.Remove(tmpfile.Name())
}