nomad: adding basic test for schema
This commit is contained in:
parent
9871e84c63
commit
cbbe50f022
|
@ -181,7 +181,7 @@ func allocTableSchema() *memdb.TableSchema {
|
|||
Indexes: map[string]*memdb.IndexSchema{
|
||||
// Primary index is a UUID
|
||||
"id": &memdb.IndexSchema{
|
||||
Name: "ID",
|
||||
Name: "id",
|
||||
AllowMissing: false,
|
||||
Unique: true,
|
||||
Indexer: &memdb.UUIDFieldIndex{
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
package nomad
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/go-memdb"
|
||||
)
|
||||
|
||||
func TestStateStoreSchema(t *testing.T) {
|
||||
schema := stateStoreSchema()
|
||||
_, err := memdb.NewMemDB(schema)
|
||||
if err != nil {
|
||||
t.Fatalf("err: %v", err)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue