fix TestCorefile1 panic for nil handling (#6802)
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
This commit is contained in:
parent
a6338e924e
commit
ae65f4e0c7
1 changed files with 5 additions and 1 deletions
|
@ -16,5 +16,9 @@ func TestCorefile1(t *testing.T) {
|
|||
acl
|
||||
`
|
||||
i, _, _, _ := CoreDNSServerAndPorts(corefile)
|
||||
defer i.Stop()
|
||||
defer func() {
|
||||
if i != nil {
|
||||
i.Stop()
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue