2018-05-01 06:35:23 +00:00
|
|
|
package local
|
|
|
|
|
|
|
|
import (
|
|
|
|
"log"
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"github.com/hashicorp/consul/agent/token"
|
|
|
|
"github.com/mitchellh/go-testing-interface"
|
|
|
|
)
|
|
|
|
|
|
|
|
// TestState returns a configured *State for testing.
|
|
|
|
func TestState(t testing.T) *State {
|
2019-08-09 19:19:30 +00:00
|
|
|
result := NewState(Config{}, log.New(os.Stderr, "", log.LstdFlags), &token.Store{})
|
2018-05-01 06:35:23 +00:00
|
|
|
result.TriggerSyncChanges = func() {}
|
|
|
|
return result
|
|
|
|
}
|