edge/pkg/storage/sqlite/document_store_test.go

26 lines
497 B
Go
Raw Normal View History

2023-02-09 12:16:36 +01:00
package sqlite
import (
"os"
"testing"
"forge.cadoles.com/arcad/edge/pkg/storage/testsuite"
"github.com/pkg/errors"
"gitlab.com/wpetit/goweb/logger"
)
func TestDocumentStore(t *testing.T) {
// t.Parallel()
logger.SetLevel(logger.LevelDebug)
file := "./testdata/documentstore_test.sqlite"
if err := os.Remove(file); err != nil && !errors.Is(err, os.ErrNotExist) {
t.Fatalf("%+v", errors.WithStack(err))
}
store := NewDocumentStore(file)
testsuite.TestDocumentStore(t, store)
}