mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 18:23:13 -04: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)
 | |
| 	}
 | |
| }
 |