aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/zdns/main_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/zdns/main_test.go')
-rw-r--r--cmd/zdns/main_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/zdns/main_test.go b/cmd/zdns/main_test.go
index da0bfcb..4b4d6ad 100644
--- a/cmd/zdns/main_test.go
+++ b/cmd/zdns/main_test.go
@@ -3,6 +3,7 @@ package main
import (
"io/ioutil"
"os"
+ "syscall"
"testing"
)
@@ -37,8 +38,11 @@ hijack_mode = "zero"
}
defer os.Remove(f)
- _, err = newCli(ioutil.Discard, []string{"-f", f}, f, make(chan os.Signal, 1))
+ sig := make(chan os.Signal, 1)
+ cli, err := newCli(ioutil.Discard, []string{"-f", f}, f, sig)
if err != nil {
t.Fatal(err)
}
+ sig <- syscall.SIGTERM
+ cli.sh.Close()
}