aboutsummaryrefslogtreecommitdiff
path: root/middleware/test/file_test.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2016-10-02 15:58:01 +0100
committerGravatar GitHub <noreply@github.com> 2016-10-02 15:58:01 +0100
commit4096c4906d5835292b9968d5261b91a1db9d89b6 (patch)
treeb17d7048efc43fdb507410520db3a6951de7f0cb /middleware/test/file_test.go
parente54c232c8c97fb163647c697e921e6f69846e304 (diff)
downloadcoredns-4096c4906d5835292b9968d5261b91a1db9d89b6.tar.gz
coredns-4096c4906d5835292b9968d5261b91a1db9d89b6.tar.zst
coredns-4096c4906d5835292b9968d5261b91a1db9d89b6.zip
Pr 311 2 (#312)
* Add a setup test for middleware/file This fix adds a setup test for middleware/file so that there is a basic coverage for the Corefile processing of middleware/file. This fix is related to 308 (Will look into it). Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * middleware/file: use helper function for test Fixup setup_test.go and use the test.TempFile function to make things somewhat shorter. Use clean up the use of testing.T in TempFile - it is not used.
Diffstat (limited to 'middleware/test/file_test.go')
-rw-r--r--middleware/test/file_test.go2
1 files changed, 1 insertions, 1 deletions
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)
}