mirror of
				https://github.com/coredns/coredns.git
				synced 2025-11-04 03:03:14 -05:00 
			
		
		
		
	
		
			
	
	
		
			16 lines
		
	
	
		
			224 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			16 lines
		
	
	
		
			224 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| 
								 | 
							
								package dnstap
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								import (
							 | 
						||
| 
								 | 
							
									"context"
							 | 
						||
| 
								 | 
							
									"testing"
							 | 
						||
| 
								 | 
							
								)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								func TestDnstapContext(t *testing.T) {
							 | 
						||
| 
								 | 
							
									ctx := tapContext{context.TODO(), Dnstap{}}
							 | 
						||
| 
								 | 
							
									tapper := TapperFromContext(ctx)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
									if tapper == nil {
							 | 
						||
| 
								 | 
							
										t.Fatal("Can't get tapper")
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
								}
							 |