From fb4d07243d846d5730f69e279cd123deb969a8e9 Mon Sep 17 00:00:00 2001 From: freddygv Date: Mon, 12 Apr 2021 09:26:55 -0600 Subject: [PATCH] Avoid failing test due to undiscoverable node name --- agent/dns_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/agent/dns_test.go b/agent/dns_test.go index 08583caee..db03243bf 100644 --- a/agent/dns_test.go +++ b/agent/dns_test.go @@ -6688,7 +6688,7 @@ func TestDNS_trimUDPResponse_NoTrim(t *testing.T) { }, } - cfg := loadRuntimeConfig(t, `data_dir = "a" bind_addr = "127.0.0.1"`) + cfg := loadRuntimeConfig(t, `node_name = "test" data_dir = "a" bind_addr = "127.0.0.1"`) if trimmed := trimUDPResponse(req, resp, cfg.DNSUDPAnswerLimit); trimmed { t.Fatalf("Bad %#v", *resp) } @@ -6722,7 +6722,7 @@ func TestDNS_trimUDPResponse_NoTrim(t *testing.T) { func TestDNS_trimUDPResponse_TrimLimit(t *testing.T) { t.Parallel() - cfg := loadRuntimeConfig(t, `data_dir = "a" bind_addr = "127.0.0.1"`) + cfg := loadRuntimeConfig(t, `node_name = "test" data_dir = "a" bind_addr = "127.0.0.1"`) req, resp, expected := &dns.Msg{}, &dns.Msg{}, &dns.Msg{} for i := 0; i < cfg.DNSUDPAnswerLimit+1; i++ { @@ -6770,7 +6770,7 @@ func loadRuntimeConfig(t *testing.T, hcl string) *config.RuntimeConfig { func TestDNS_trimUDPResponse_TrimSize(t *testing.T) { t.Parallel() - cfg := loadRuntimeConfig(t, `data_dir = "a" bind_addr = "127.0.0.1"`) + cfg := loadRuntimeConfig(t, `node_name = "test" data_dir = "a" bind_addr = "127.0.0.1"`) req, resp := &dns.Msg{}, &dns.Msg{} for i := 0; i < 100; i++ { @@ -6823,7 +6823,7 @@ func TestDNS_trimUDPResponse_TrimSize(t *testing.T) { func TestDNS_trimUDPResponse_TrimSizeEDNS(t *testing.T) { t.Parallel() - cfg := loadRuntimeConfig(t, `data_dir = "a" bind_addr = "127.0.0.1"`) + cfg := loadRuntimeConfig(t, `node_name = "test" data_dir = "a" bind_addr = "127.0.0.1"`) req, resp := &dns.Msg{}, &dns.Msg{}