mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
25 lines
450 B
Go
25 lines
450 B
Go
package bolt
|
|
|
|
import (
|
|
"net/url"
|
|
"os"
|
|
"testing"
|
|
|
|
"gitlab-odx.oracle.com/odx/functions/api/datastore/internal/datastoretest"
|
|
)
|
|
|
|
const tmpBolt = "/tmp/func_test_bolt.db"
|
|
|
|
func TestDatastore(t *testing.T) {
|
|
os.Remove(tmpBolt)
|
|
u, err := url.Parse("bolt://" + tmpBolt)
|
|
if err != nil {
|
|
t.Fatalf("failed to parse url:", err)
|
|
}
|
|
ds, err := New(u)
|
|
if err != nil {
|
|
t.Fatalf("failed to create bolt datastore:", err)
|
|
}
|
|
datastoretest.Test(t, ds)
|
|
}
|