diff --git a/agent/consul/usagemetrics/usagemetrics_oss_test.go b/agent/consul/usagemetrics/usagemetrics_oss_test.go index ec564e39f..d4919914f 100644 --- a/agent/consul/usagemetrics/usagemetrics_oss_test.go +++ b/agent/consul/usagemetrics/usagemetrics_oss_test.go @@ -14,8 +14,8 @@ import ( "github.com/hashicorp/consul/sdk/testutil" ) -func newStateStore() *state.Store { - return state.NewStateStore(nil) +func newStateStore() (*state.Store, error) { + return state.NewStateStore(nil), nil } func TestUsageReporter_emitServiceUsage_OSS(t *testing.T) { diff --git a/agent/consul/usagemetrics/usagemetrics_test.go b/agent/consul/usagemetrics/usagemetrics_test.go index a91fdf151..cd34581c6 100644 --- a/agent/consul/usagemetrics/usagemetrics_test.go +++ b/agent/consul/usagemetrics/usagemetrics_test.go @@ -62,7 +62,8 @@ func TestUsageReporter_Run_Nodes(t *testing.T) { metrics.NewGlobal(cfg, sink) mockStateProvider := &mockStateProvider{} - s := newStateStore() + s, err := newStateStore() + require.NoError(t, err) if tcase.modfiyStateStore != nil { tcase.modfiyStateStore(t, s) }