Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions xds/internal/clients/xdsclient/xdsclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ type XDSClient struct {
// New returns a new xDS Client configured with the provided config.
func New(config Config) (*XDSClient, error) {
switch {
case config.Node.ID == "":
return nil, errors.New("xdsclient: node ID is empty")
case config.ResourceTypes == nil:
return nil, errors.New("xdsclient: resource types map is nil")
case config.TransportBuilder == nil:
Expand Down
15 changes: 10 additions & 5 deletions xds/internal/clients/xdsclient/xdsclient_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ func (s) TestXDSClient_New(t *testing.T) {
config Config
wantErr string
}{
{
name: "empty node ID",
config: Config{},
wantErr: "node ID is empty",
},
{
name: "nil resource types",
config: Config{
Expand Down Expand Up @@ -75,6 +70,16 @@ func (s) TestXDSClient_New(t *testing.T) {
},
wantErr: "",
},
{
name: "success with servers and empty nodeID",
config: Config{
Node: clients.Node{ID: ""},
ResourceTypes: map[string]ResourceType{xdsresource.V3ListenerURL: listenerType},
TransportBuilder: grpctransport.NewBuilder(configs),
Servers: []ServerConfig{{ServerIdentifier: clients.ServerIdentifier{ServerURI: "dummy-server"}}},
},
wantErr: "",
},
{
name: "success with authorities",
config: Config{
Expand Down
Loading