mirror of
https://github.com/coredns/coredns.git
synced 2025-08-08 07:17:01 +02:00
20 lines
483 B
Go
20 lines
483 B
Go
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)
|
|
}
|
|
}
|