github.com/manicqin/nomad@v0.9.5/nomad/state/testing.go (about) 1 package state 2 3 import ( 4 testing "github.com/mitchellh/go-testing-interface" 5 6 "github.com/hashicorp/nomad/helper/testlog" 7 ) 8 9 func TestStateStore(t testing.T) *StateStore { 10 config := &StateStoreConfig{ 11 Logger: testlog.HCLogger(t), 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 }