mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
* Remove MDS and replace it with Controller This commit removes the MDS layer (and package) and shifts Controller package into its place. * add pprof/fgprof to serverless http router --------- Co-authored-by: Matthew Jaffee <jaffee@pilosa.com>
29 lines
810 B
Go
29 lines
810 B
Go
package test
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
|
|
"github.com/featurebasedb/featurebase/v3/dax/boltdb"
|
|
"github.com/featurebasedb/featurebase/v3/dax/controller/schemar"
|
|
schemarbolt "github.com/featurebasedb/featurebase/v3/dax/controller/schemar/boltdb"
|
|
testbolt "github.com/featurebasedb/featurebase/v3/dax/test/boltdb"
|
|
"github.com/featurebasedb/featurebase/v3/logger"
|
|
)
|
|
|
|
func NewSchemar(t *testing.T) (schemar schemar.Schemar, cleanup func()) {
|
|
td, err := os.MkdirTemp("", "schemartest_*")
|
|
if err != nil {
|
|
t.Fatalf(": %v", err)
|
|
}
|
|
db, err := boltdb.NewSvcBolt(td, "schemar", schemarbolt.SchemarBuckets...)
|
|
if err != nil {
|
|
t.Fatalf("opening boltdb: %v", err)
|
|
}
|
|
|
|
s := schemarbolt.NewSchemar(db, logger.StderrLogger)
|
|
return s, func() {
|
|
testbolt.MustCloseDB(t, db)
|
|
testbolt.CleanupDB(t, db.Path())
|
|
}
|
|
}
|