parent
f33b02689c
commit
1b7492be6e
41 changed files with 3537 additions and 0 deletions
19
middleware/dnstap/setup_test.go
Normal file
19
middleware/dnstap/setup_test.go
Normal file
|
@ -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)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue