aboutsummaryrefslogtreecommitdiff
path: root/test/file_upstream_test.go
diff options
context:
space:
mode:
authorGravatar Xuanwo <xuanwo.cn@gmail.com> 2019-01-28 15:25:14 +0800
committerGravatar Miek Gieben <miek@miek.nl> 2019-01-28 07:25:14 +0000
commitffe79b026e3dc3b3a1eb1f95224b570d7764e0b6 (patch)
treeef597b0b2d96381d7bebb00edf85d4f3a80cc0e1 /test/file_upstream_test.go
parentf300fa9bb25f6693bd3d9a314f054c39717250c6 (diff)
downloadcoredns-ffe79b026e3dc3b3a1eb1f95224b570d7764e0b6.tar.gz
coredns-ffe79b026e3dc3b3a1eb1f95224b570d7764e0b6.tar.zst
coredns-ffe79b026e3dc3b3a1eb1f95224b570d7764e0b6.zip
Remove duplicated TempFile testsuit (#2508)
Diffstat (limited to 'test/file_upstream_test.go')
-rw-r--r--test/file_upstream_test.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/file_upstream_test.go b/test/file_upstream_test.go
index 36f2bbc56..3c4296b99 100644
--- a/test/file_upstream_test.go
+++ b/test/file_upstream_test.go
@@ -3,11 +3,13 @@ package test
import (
"testing"
+ "github.com/coredns/coredns/plugin/test"
+
"github.com/miekg/dns"
)
func TestFileUpstream(t *testing.T) {
- name, rm, err := TempFile(".", `$ORIGIN example.org.
+ name, rm, err := test.TempFile(".", `$ORIGIN example.org.
@ 3600 IN SOA sns.dns.icann.org. noc.dns.icann.org. (
2017042745 ; serial
7200 ; refresh (2 hours)
@@ -61,7 +63,7 @@ www 3600 IN CNAME www.example.net.
// TestFileUpstreamAdditional runs two CoreDNS servers that serve example.org and foo.example.org.
// example.org contains a cname to foo.example.org; this should be resolved via upstream.Self.
func TestFileUpstreamAdditional(t *testing.T) {
- name, rm, err := TempFile(".", `$ORIGIN example.org.
+ name, rm, err := test.TempFile(".", `$ORIGIN example.org.
@ 3600 IN SOA sns.dns.icann.org. noc.dns.icann.org. 2017042745 7200 3600 1209600 3600
3600 IN NS b.iana-servers.net.
@@ -73,7 +75,7 @@ www 3600 IN CNAME www.foo
}
defer rm()
- name2, rm2, err2 := TempFile(".", `$ORIGIN foo.example.org.
+ name2, rm2, err2 := test.TempFile(".", `$ORIGIN foo.example.org.
@ 3600 IN SOA sns.dns.icann.org. noc.dns.icann.org. 2017042745 7200 3600 1209600 3600
3600 IN NS b.iana-servers.net.