diff options
author | 2017-07-24 23:12:50 +0200 | |
---|---|---|
committer | 2017-07-24 14:12:50 -0700 | |
commit | 1b7492be6e07f4b8306c0b4a56d79f37485ae61c (patch) | |
tree | 02510da5a7cf228821373a8090bac29055764aba /middleware/dnstap/setup_test.go | |
parent | f33b02689c564c1de8774f7f99d2400231a76069 (diff) | |
download | coredns-1b7492be6e07f4b8306c0b4a56d79f37485ae61c.tar.gz coredns-1b7492be6e07f4b8306c0b4a56d79f37485ae61c.tar.zst coredns-1b7492be6e07f4b8306c0b4a56d79f37485ae61c.zip |
WIP: middleware/dnstap (#711)
middleware/dnstap add
Diffstat (limited to 'middleware/dnstap/setup_test.go')
-rw-r--r-- | middleware/dnstap/setup_test.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/middleware/dnstap/setup_test.go b/middleware/dnstap/setup_test.go new file mode 100644 index 000000000..fb4bca1f0 --- /dev/null +++ b/middleware/dnstap/setup_test.go @@ -0,0 +1,19 @@ +package dnstap + +import ( + "github.com/mholt/caddy" + "testing" +) + +func TestConfig(t *testing.T) { + file := "dnstap dnstap.sock full" + c := caddy.NewTestController("dns", file) + if path, full, err := parseConfig(&c.Dispenser); path != "dnstap.sock" || !full { + t.Fatalf("%s: %s", file, err) + } + file = "dnstap dnstap.sock" + c = caddy.NewTestController("dns", file) + if path, full, err := parseConfig(&c.Dispenser); path != "dnstap.sock" || full { + t.Fatalf("%s: %s", file, err) + } +} |