2017-10-13 21:36:02 +00:00
|
|
|
package state
|
|
|
|
|
|
|
|
import (
|
2019-01-15 19:46:12 +00:00
|
|
|
testing "github.com/mitchellh/go-testing-interface"
|
|
|
|
|
2018-03-06 18:12:17 +00:00
|
|
|
"github.com/hashicorp/nomad/helper/testlog"
|
2017-10-13 21:36:02 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestStateStore(t testing.T) *StateStore {
|
|
|
|
config := &StateStoreConfig{
|
2018-09-15 23:23:13 +00:00
|
|
|
Logger: testlog.HCLogger(t),
|
|
|
|
Region: "global",
|
2017-10-13 21:36:02 +00:00
|
|
|
}
|
|
|
|
state, err := NewStateStore(config)
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("err: %v", err)
|
|
|
|
}
|
|
|
|
if state == nil {
|
|
|
|
t.Fatalf("missing state")
|
|
|
|
}
|
|
|
|
TestInitState(t, state)
|
|
|
|
return state
|
|
|
|
}
|