Browse Source

Ensure that a test server gets the full type registry instead of constructing its own

pull/20476/head
Matt Keeler 10 months ago
parent
commit
a03cb97cb0
  1. 11
      agent/consul/client_test.go

11
agent/consul/client_test.go

@ -7,9 +7,6 @@ import (
"bytes"
"context"
"fmt"
"github.com/hashicorp/consul/internal/catalog"
"github.com/hashicorp/consul/internal/mesh"
"github.com/hashicorp/consul/internal/resource/demo"
"net"
"os"
"strings"
@ -17,8 +14,6 @@ import (
"testing"
"time"
"github.com/hashicorp/consul/internal/resource"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/serf/serf"
"github.com/stretchr/testify/require"
@ -562,10 +557,6 @@ func newDefaultDeps(t testutil.TestingTB, c *Config) Deps {
RPCHoldTimeout: c.RPCHoldTimeout,
}
connPool.SetRPCClientTimeout(c.RPCClientTimeout)
registry := resource.NewRegistry()
demo.RegisterTypes(registry)
mesh.RegisterTypes(registry)
catalog.RegisterTypes(registry)
return Deps{
EventPublisher: stream.NewEventPublisher(10 * time.Second),
Logger: logger,
@ -585,7 +576,7 @@ func newDefaultDeps(t testutil.TestingTB, c *Config) Deps {
GetNetRPCInterceptorFunc: middleware.GetNetRPCInterceptor,
EnterpriseDeps: newDefaultDepsEnterprise(t, logger, c),
XDSStreamLimiter: limiter.NewSessionLimiter(),
Registry: registry,
Registry: NewTypeRegistry(),
}
}

Loading…
Cancel
Save