Fix outdated test (#6747)
Signed-off-by: Frederic Hemery <frederic.hemery@datadoghq.com>
This commit is contained in:
parent
b481169b01
commit
db17037a25
1 changed files with 10 additions and 7 deletions
|
@ -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 {
|
||||
i, _, _, _ := CoreDNSServerAndPorts(corefile)
|
||||
defer i.Stop()
|
||||
t.Fatalf("Expected an error got none")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue