aboutsummaryrefslogtreecommitdiff
path: root/src/net/http/export_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/http/export_test.go')
-rw-r--r--src/net/http/export_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/net/http/export_test.go b/src/net/http/export_test.go
index b61f58b2db..596171f5f0 100644
--- a/src/net/http/export_test.go
+++ b/src/net/http/export_test.go
@@ -8,9 +8,11 @@
package http
import (
+ "context"
"net"
"sort"
"sync"
+ "testing"
"time"
)
@@ -199,3 +201,7 @@ func (s *Server) ExportAllConnsIdle() bool {
}
return true
}
+
+func (r *Request) WithT(t *testing.T) *Request {
+ return r.WithContext(context.WithValue(r.Context(), tLogKey{}, t.Logf))
+}