diff options
author | 2019-06-13 19:07:41 +0800 | |
---|---|---|
committer | 2019-06-13 12:07:41 +0100 | |
commit | c1d7c2e69becba8c9dd700aea9819a4ebde2facb (patch) | |
tree | f6cd09fc12e0fb21505ffee9a698733adde1aa78 /plugin/auto/setup_test.go | |
parent | 481dea50adf367dff57bbe0ed454ae6f5eaf72d7 (diff) | |
download | coredns-c1d7c2e69becba8c9dd700aea9819a4ebde2facb.tar.gz coredns-c1d7c2e69becba8c9dd700aea9819a4ebde2facb.tar.zst coredns-c1d7c2e69becba8c9dd700aea9819a4ebde2facb.zip |
Raise error if regexp and template are not specified together (#2884)
Signed-off-by: Xiao An <hac@zju.edu.cn>
Diffstat (limited to 'plugin/auto/setup_test.go')
-rw-r--r-- | plugin/auto/setup_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugin/auto/setup_test.go b/plugin/auto/setup_test.go index 3ea50eb99..e3c59d673 100644 --- a/plugin/auto/setup_test.go +++ b/plugin/auto/setup_test.go @@ -75,6 +75,13 @@ func TestAutoParse(t *testing.T) { }`, true, "/tmp", "bliep", `(.*)`, 10 * time.Second, nil, }, + // no template specified. + { + `auto { + directory /tmp (.*) + }`, + true, "/tmp", "", `(.*)`, 60 * time.Second, nil, + }, // no directory specified. { `auto example.org { |