aboutsummaryrefslogtreecommitdiff
path: root/test/auto_test.go
diff options
context:
space:
mode:
authorGravatar Manuel Stocker <mensi@mensi.ch> 2018-10-21 15:59:37 +0200
committerGravatar corbot[bot] <corbot[bot]@users.noreply.github.com> 2018-10-21 13:59:37 +0000
commit4b1b0ec9e61dcf02dc7a79e504ca3eae4a3b4b53 (patch)
tree5ccb309de73dcf49cc4370ec3e08a64604b8e347 /test/auto_test.go
parentcf0422371825e97608950d015b5f570416444d4f (diff)
downloadcoredns-4b1b0ec9e61dcf02dc7a79e504ca3eae4a3b4b53.tar.gz
coredns-4b1b0ec9e61dcf02dc7a79e504ca3eae4a3b4b53.tar.zst
coredns-4b1b0ec9e61dcf02dc7a79e504ca3eae4a3b4b53.zip
Use filepath when manipulating file paths (#2221)
Automatically submitted.
Diffstat (limited to 'test/auto_test.go')
-rw-r--r--test/auto_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/auto_test.go b/test/auto_test.go
index 275d84b06..c45aed4fa 100644
--- a/test/auto_test.go
+++ b/test/auto_test.go
@@ -3,7 +3,7 @@ package test
import (
"io/ioutil"
"os"
- "path"
+ "path/filepath"
"testing"
"time"
@@ -46,7 +46,7 @@ func TestAuto(t *testing.T) {
}
// Write db.example.org to get example.org.
- if err = ioutil.WriteFile(path.Join(tmpdir, "db.example.org"), []byte(zoneContent), 0644); err != nil {
+ if err = ioutil.WriteFile(filepath.Join(tmpdir, "db.example.org"), []byte(zoneContent), 0644); err != nil {
t.Fatal(err)
}
@@ -61,7 +61,7 @@ func TestAuto(t *testing.T) {
}
// Remove db.example.org again.
- os.Remove(path.Join(tmpdir, "db.example.org"))
+ os.Remove(filepath.Join(tmpdir, "db.example.org"))
time.Sleep(1100 * time.Millisecond) // wait for it to be picked up
resp, err = p.Lookup(state, "www.example.org.", dns.TypeA)
@@ -139,7 +139,7 @@ func TestAutoAXFR(t *testing.T) {
defer i.Stop()
// Write db.example.org to get example.org.
- if err = ioutil.WriteFile(path.Join(tmpdir, "db.example.org"), []byte(zoneContent), 0644); err != nil {
+ if err = ioutil.WriteFile(filepath.Join(tmpdir, "db.example.org"), []byte(zoneContent), 0644); err != nil {
t.Fatal(err)
}