aboutsummaryrefslogtreecommitdiff
path: root/middleware/test
diff options
context:
space:
mode:
Diffstat (limited to 'middleware/test')
-rw-r--r--middleware/test/file.go3
-rw-r--r--middleware/test/file_test.go2
2 files changed, 2 insertions, 3 deletions
diff --git a/middleware/test/file.go b/middleware/test/file.go
index b6068a32b..626224cac 100644
--- a/middleware/test/file.go
+++ b/middleware/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/middleware/test/file_test.go b/middleware/test/file_test.go
index 950ea7cff..ed86a8260 100644
--- a/middleware/test/file_test.go
+++ b/middleware/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)
}