mirror of
				https://github.com/coredns/coredns.git
				synced 2025-11-03 18:53:13 -05: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)
 | 
						|
	}
 | 
						|
}
 |