aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/cache_test.go2
-rw-r--r--test/file.go3
-rw-r--r--test/file_test.go2
-rw-r--r--test/middleware_dnssec_test.go2
-rw-r--r--test/middleware_test.go2
-rw-r--r--test/proxy_test.go2
6 files changed, 6 insertions, 7 deletions
diff --git a/test/cache_test.go b/test/cache_test.go
index 8382aabba..ba24962ec 100644
--- a/test/cache_test.go
+++ b/test/cache_test.go
@@ -17,7 +17,7 @@ import (
func TestLookupCache(t *testing.T) {
// Start auth. CoreDNS holding the auth zone.
- name, rm, err := test.TempFile(t, ".", exampleOrg)
+ name, rm, err := test.TempFile(".", exampleOrg)
if err != nil {
t.Fatalf("failed to created zone: %s", err)
}
diff --git a/test/file.go b/test/file.go
index b6068a32b..626224cac 100644
--- a/test/file.go
+++ b/test/file.go
@@ -3,11 +3,10 @@ package test
import (
"io/ioutil"
"os"
- "testing"
)
// TempFile will create a temporary file on disk and returns the name and a cleanup function to remove it later.
-func TempFile(t *testing.T, dir, content string) (string, func(), error) {
+func TempFile(dir, content string) (string, func(), error) {
f, err := ioutil.TempFile(dir, "go-test-tmpfile")
if err != nil {
return "", nil, err
diff --git a/test/file_test.go b/test/file_test.go
index 950ea7cff..ed86a8260 100644
--- a/test/file_test.go
+++ b/test/file_test.go
@@ -3,7 +3,7 @@ package test
import "testing"
func TestTempFile(t *testing.T) {
- _, f, e := TempFile(t, ".", "test")
+ _, f, e := TempFile(".", "test")
if e != nil {
t.Fatalf("failed to create temp file: %s", e)
}
diff --git a/test/middleware_dnssec_test.go b/test/middleware_dnssec_test.go
index 238673925..692e39141 100644
--- a/test/middleware_dnssec_test.go
+++ b/test/middleware_dnssec_test.go
@@ -12,7 +12,7 @@ import (
)
func TestLookupBalanceRewriteCacheDnssec(t *testing.T) {
- name, rm, err := test.TempFile(t, ".", exampleOrg)
+ name, rm, err := test.TempFile(".", exampleOrg)
if err != nil {
t.Fatalf("failed to created zone: %s", err)
}
diff --git a/test/middleware_test.go b/test/middleware_test.go
index fb6fa2114..a9b803fc5 100644
--- a/test/middleware_test.go
+++ b/test/middleware_test.go
@@ -12,7 +12,7 @@ import (
func benchmarkLookupBalanceRewriteCache(b *testing.B) {
t := new(testing.T)
- name, rm, err := test.TempFile(t, ".", exampleOrg)
+ name, rm, err := test.TempFile(".", exampleOrg)
if err != nil {
t.Fatalf("failed to created zone: %s", err)
}
diff --git a/test/proxy_test.go b/test/proxy_test.go
index 634fde888..400aee0b5 100644
--- a/test/proxy_test.go
+++ b/test/proxy_test.go
@@ -21,7 +21,7 @@ example.org. IN A 127.0.0.2
`
func TestLookupProxy(t *testing.T) {
- name, rm, err := test.TempFile(t, ".", exampleOrg)
+ name, rm, err := test.TempFile(".", exampleOrg)
if err != nil {
t.Fatalf("failed to created zone: %s", err)
}