blob: fb4bca1f0107042f4056b194dbdf40c0f8ab7eaf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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)
}
}
|