open-nomad/nomad/state/testing.go
Alex Dadgar 3c19d01d7a server
2018-09-15 16:23:13 -07:00

23 lines
423 B
Go

package state
import (
"github.com/hashicorp/nomad/helper/testlog"
"github.com/mitchellh/go-testing-interface"
)
func TestStateStore(t testing.T) *StateStore {
config := &StateStoreConfig{
Logger: testlog.HCLogger(t),
Region: "global",
}
state, err := NewStateStore(config)
if err != nil {
t.Fatalf("err: %v", err)
}
if state == nil {
t.Fatalf("missing state")
}
TestInitState(t, state)
return state
}