mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-30 01:34:21 -04:00 
			
		
		
		
	
		
			
	
	
		
			20 lines
		
	
	
		
			364 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			20 lines
		
	
	
		
			364 B
		
	
	
	
		
			Go
		
	
	
	
	
	
|   | package loop | ||
|  | 
 | ||
|  | import ( | ||
|  | 	"testing" | ||
|  | 
 | ||
|  | 	"github.com/mholt/caddy" | ||
|  | ) | ||
|  | 
 | ||
|  | func TestSetup(t *testing.T) { | ||
|  | 	c := caddy.NewTestController("dns", `loop`) | ||
|  | 	if err := setup(c); err != nil { | ||
|  | 		t.Fatalf("Expected no errors, but got: %v", err) | ||
|  | 	} | ||
|  | 
 | ||
|  | 	c = caddy.NewTestController("dns", `loop argument`) | ||
|  | 	if err := setup(c); err == nil { | ||
|  | 		t.Fatal("Expected errors, but got none") | ||
|  | 	} | ||
|  | } |