Avoid failing test due to undiscoverable node name
This commit is contained in:
parent
9c219a5b58
commit
fb4d07243d
|
@ -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 {
|
if trimmed := trimUDPResponse(req, resp, cfg.DNSUDPAnswerLimit); trimmed {
|
||||||
t.Fatalf("Bad %#v", *resp)
|
t.Fatalf("Bad %#v", *resp)
|
||||||
}
|
}
|
||||||
|
@ -6722,7 +6722,7 @@ func TestDNS_trimUDPResponse_NoTrim(t *testing.T) {
|
||||||
|
|
||||||
func TestDNS_trimUDPResponse_TrimLimit(t *testing.T) {
|
func TestDNS_trimUDPResponse_TrimLimit(t *testing.T) {
|
||||||
t.Parallel()
|
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{}
|
req, resp, expected := &dns.Msg{}, &dns.Msg{}, &dns.Msg{}
|
||||||
for i := 0; i < cfg.DNSUDPAnswerLimit+1; i++ {
|
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) {
|
func TestDNS_trimUDPResponse_TrimSize(t *testing.T) {
|
||||||
t.Parallel()
|
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{}
|
req, resp := &dns.Msg{}, &dns.Msg{}
|
||||||
for i := 0; i < 100; i++ {
|
for i := 0; i < 100; i++ {
|
||||||
|
@ -6823,7 +6823,7 @@ func TestDNS_trimUDPResponse_TrimSize(t *testing.T) {
|
||||||
|
|
||||||
func TestDNS_trimUDPResponse_TrimSizeEDNS(t *testing.T) {
|
func TestDNS_trimUDPResponse_TrimSizeEDNS(t *testing.T) {
|
||||||
t.Parallel()
|
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{}
|
req, resp := &dns.Msg{}, &dns.Msg{}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue