github.com/blixtra/nomad@v0.7.2-0.20171221000451-da9a1d7bb050/nomad/state/testing.go (about) 1 package state 2 3 import ( 4 "os" 5 6 "github.com/mitchellh/go-testing-interface" 7 ) 8 9 func TestStateStore(t testing.T) *StateStore { 10 config := &StateStoreConfig{ 11 LogOutput: os.Stderr, 12 Region: "global", 13 } 14 state, err := NewStateStore(config) 15 if err != nil { 16 t.Fatalf("err: %v", err) 17 } 18 if state == nil { 19 t.Fatalf("missing state") 20 } 21 TestInitState(t, state) 22 return state 23 }