aboutsummaryrefslogtreecommitdiff
path: root/plugin/file/setup_test.go
diff options
context:
space:
mode:
authorGravatar Xiao An <hac@zju.edu.cn> 2019-04-01 14:28:01 +0800
committerGravatar Miek Gieben <miek@miek.nl> 2019-04-01 07:28:01 +0100
commitcb96ab9f4fe8e4c7a99cdd2a7f7af315f98231a9 (patch)
tree685a047089ad4554751e0747cd37650eec3e8ecc /plugin/file/setup_test.go
parent99c3d065bcfe9172ac86d9e18639e4a574707514 (diff)
downloadcoredns-cb96ab9f4fe8e4c7a99cdd2a7f7af315f98231a9.tar.gz
coredns-cb96ab9f4fe8e4c7a99cdd2a7f7af315f98231a9.tar.zst
coredns-cb96ab9f4fe8e4c7a99cdd2a7f7af315f98231a9.zip
Fully deprecate TIMEOUT and NO_RELOAD (#2742)
* Fully deprecate NO_RELOAD Signed-off-by: Xiao An <hac@zju.edu.cn> * Fully deprecate TIMEOUT Signed-off-by: Xiao An <hac@zju.edu.cn> * Update CI tests to adapt to the deprecation of TIMEOUT Signed-off-by: Xiao An <hac@zju.edu.cn> * Add documents for directive transfer in plugin auto Signed-off-by: Xiao An <hac@zju.edu.cn>
Diffstat (limited to 'plugin/file/setup_test.go')
-rw-r--r--plugin/file/setup_test.go34
1 files changed, 21 insertions, 13 deletions
diff --git a/plugin/file/setup_test.go b/plugin/file/setup_test.go
index 1a3cba0e8..ccd41666d 100644
--- a/plugin/file/setup_test.go
+++ b/plugin/file/setup_test.go
@@ -27,18 +27,6 @@ func TestFileParse(t *testing.T) {
expectedZones Zones
}{
{
- `file ` + zoneFileName1 + ` miek.nl {
- transfer from 127.0.0.1
- }`,
- true,
- Zones{},
- },
- {
- `file`,
- true,
- Zones{},
- },
- {
`file ` + zoneFileName1 + ` miek.nl.`,
false,
Zones{Names: []string{"miek.nl."}},
@@ -60,12 +48,32 @@ func TestFileParse(t *testing.T) {
false, // OK for now as we disregard any options for the `upstream`.
Zones{Names: []string{"example.net."}},
},
+ // errors.
+ {
+ `file ` + zoneFileName1 + ` miek.nl {
+ transfer from 127.0.0.1
+ }`,
+ true,
+ Zones{},
+ },
+ {
+ `file`,
+ true,
+ Zones{},
+ },
+ {
+ `file ` + zoneFileName1 + ` example.net. {
+ no_reload
+ }`,
+ true,
+ Zones{},
+ },
{
`file ` + zoneFileName1 + ` example.net. {
no_rebloat
}`,
true,
- Zones{Names: []string{}},
+ Zones{},
},
}