1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
package dnstap import ( "context" "testing" ) func TestDnstapContext(t *testing.T) { ctx := ContextWithTapper(context.TODO(), Dnstap{}) tapper := TapperFromContext(ctx) if tapper == nil { t.Fatal("Can't get tapper") } }