2018-05-01 06:35:23 +00:00
|
|
|
package local
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"github.com/hashicorp/consul/agent/token"
|
2020-01-28 23:50:41 +00:00
|
|
|
"github.com/hashicorp/go-hclog"
|
2018-05-01 06:35:23 +00:00
|
|
|
"github.com/mitchellh/go-testing-interface"
|
|
|
|
)
|
|
|
|
|
|
|
|
// TestState returns a configured *State for testing.
|
2020-11-05 16:18:59 +00:00
|
|
|
func TestState(_ testing.T) *State {
|
2020-01-28 23:50:41 +00:00
|
|
|
logger := hclog.New(&hclog.LoggerOptions{
|
|
|
|
Output: os.Stderr,
|
|
|
|
})
|
|
|
|
|
|
|
|
result := NewState(Config{}, logger, &token.Store{})
|
2018-05-01 06:35:23 +00:00
|
|
|
result.TriggerSyncChanges = func() {}
|
|
|
|
return result
|
|
|
|
}
|