nomad: adding basic test for schema

This commit is contained in:
Armon Dadgar 2015-07-03 17:48:02 -07:00
parent 9871e84c63
commit cbbe50f022
2 changed files with 16 additions and 1 deletions

View File

@ -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{

15
nomad/schema_test.go Normal file
View File

@ -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)
}
}