mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 16:24:19 -04:00
Fix outdated test (#6747)
Signed-off-by: Frederic Hemery <frederic.hemery@datadoghq.com>
This commit is contained in:
@@ -5,13 +5,16 @@ import (
|
||||
)
|
||||
|
||||
func TestCorefile1(t *testing.T) {
|
||||
corefile := `ȶ
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
t.Fatalf("Expected no panic, but got %v", r)
|
||||
}
|
||||
}()
|
||||
|
||||
// this used to crash
|
||||
corefile := `\\\\ȶ.
|
||||
acl
|
||||
`
|
||||
// this crashed, now it should return an error.
|
||||
i, _, _, err := CoreDNSServerAndPorts(corefile)
|
||||
if err == nil {
|
||||
defer i.Stop()
|
||||
t.Fatalf("Expected an error got none")
|
||||
}
|
||||
i, _, _, _ := CoreDNSServerAndPorts(corefile)
|
||||
defer i.Stop()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user