Commit 011686b3 authored by Li Zhijian's avatar Li Zhijian Committed by GitHub

Cleanup tempfiles (#3986)

* cleanup tempfiles for auto_test
Signed-off-by: default avatarLi Zhijian <lizhijian@cn.fujitsu.com>

* cleanup tempfiles for metrics_test
Signed-off-by: default avatarLi Zhijian <lizhijian@cn.fujitsu.com>
parent 41f9142d
...@@ -16,6 +16,7 @@ func TestAuto(t *testing.T) { ...@@ -16,6 +16,7 @@ func TestAuto(t *testing.T) {
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
defer os.RemoveAll(tmpdir)
corefile := `org:0 { corefile := `org:0 {
auto { auto {
...@@ -74,6 +75,7 @@ func TestAutoNonExistentZone(t *testing.T) { ...@@ -74,6 +75,7 @@ func TestAutoNonExistentZone(t *testing.T) {
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
defer os.RemoveAll(tmpdir)
corefile := `.:0 { corefile := `.:0 {
auto { auto {
...@@ -112,6 +114,7 @@ func TestAutoAXFR(t *testing.T) { ...@@ -112,6 +114,7 @@ func TestAutoAXFR(t *testing.T) {
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
defer os.RemoveAll(tmpdir)
corefile := `org:0 { corefile := `org:0 {
auto { auto {
......
...@@ -73,6 +73,7 @@ func TestMetricsAuto(t *testing.T) { ...@@ -73,6 +73,7 @@ func TestMetricsAuto(t *testing.T) {
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
defer os.RemoveAll(tmpdir)
corefile := `org:0 { corefile := `org:0 {
auto { auto {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment