ezshare/store/bolt_test.go

29 lines
572 B
Go
Raw Normal View History

2021-12-04 08:58:16 +00:00
package store_test
import (
"path/filepath"
"testing"
"gitea.benny.dog/torjus/ezshare/store"
)
func TestBoltStore(t *testing.T) {
path := filepath.Join(t.TempDir(), "boltstore.db")
s, err := store.NewBoltStore(path)
if err != nil {
t.Fatalf("Error opening store: %s", err)
}
doFileStoreTest(s, t)
2021-12-05 00:00:32 +00:00
_ = s.Close()
}
func TestBoltCertificateStore(t *testing.T) {
path := filepath.Join(t.TempDir(), "boltstore.db")
s, err := store.NewBoltStore(path)
if err != nil {
t.Fatalf("Error opening store: %s", err)
}
doCertificateStoreTest(s, t)
_ = s.Close()
2021-12-04 08:58:16 +00:00
}