Skip to content

Commit

Permalink
fix ci errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jmurret committed Jul 9, 2024
1 parent 875df34 commit 6814d9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/consuldp/consul_dataplane.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func validateConfig(cfg *Config) error {
case cfg.Mode == ModeTypeSidecar && !strings.HasPrefix(cfg.XDSServer.BindAddress, "unix://") && !net.ParseIP(cfg.XDSServer.BindAddress).IsLoopback():
return errors.New("non-local xDS bind address not allowed")
case cfg.Mode == ModeTypeSidecar && cfg.DNSServer.Port != -1 && !net.ParseIP(cfg.DNSServer.BindAddr).IsLoopback():
return errors.New("non-local DNS proxy bind address not allowed when running as sidecar")
return errors.New("non-local DNS proxy bind address not allowed when running as a sidecar")
}

creds := cfg.Consul.Credentials
Expand Down
3 changes: 2 additions & 1 deletion pkg/consuldp/consul_dataplane_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (

func validConfig() *Config {
return &Config{
Mode: ModeTypeSidecar,
Consul: &ConsulConfig{
Addresses: "consul.servers.dns.com",
GRPCPort: 1234,
Expand Down Expand Up @@ -160,7 +161,7 @@ func TestNewConsulDPError(t *testing.T) {
c.DNSServer.BindAddr = "1.2.3.4"
c.DNSServer.Port = 1
},
expectErr: "non-local DNS proxy bind address not allowed",
expectErr: "non-local DNS proxy bind address not allowed when running as a sidecar",
},
{
name: "no bearer token or path given",
Expand Down

0 comments on commit 6814d9f

Please sign in to comment.