mirror of
				https://github.com/coredns/coredns.git
				synced 2025-11-04 03:03:14 -05:00 
			
		
		
		
	
		
			
	
	
		
			18 lines
		
	
	
		
			273 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			18 lines
		
	
	
		
			273 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| 
								 | 
							
								package test
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								import (
							 | 
						||
| 
								 | 
							
									"testing"
							 | 
						||
| 
								 | 
							
								)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								func TestCorefile1(t *testing.T) {
							 | 
						||
| 
								 | 
							
									corefile := `ȶ
							 | 
						||
| 
								 | 
							
								acl
							 | 
						||
| 
								 | 
							
								`
							 | 
						||
| 
								 | 
							
									// this crashed, now it should return an error.
							 | 
						||
| 
								 | 
							
									i, _, _, err := CoreDNSServerAndPorts(corefile)
							 | 
						||
| 
								 | 
							
									if err == nil {
							 | 
						||
| 
								 | 
							
										defer i.Stop()
							 | 
						||
| 
								 | 
							
										t.Fatalf("Expected an error got none")
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
								}
							 |