mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Datastore tests (#551)
* common datastore tests * fix Datastore.UpdateApp * remove extra datastore tests * datastore test fixes
This commit is contained in:
committed by
Travis Reeder
parent
56e43ac772
commit
3fd3da87f3
24
api/datastore/bolt/bolt_test.go
Normal file
24
api/datastore/bolt/bolt_test.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package bolt
|
||||
|
||||
import (
|
||||
"net/url"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/iron-io/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)
|
||||
}
|
||||
Reference in New Issue
Block a user