File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import (
1111
1212 "github.com/grafana/dskit/httpgrpc"
1313 "github.com/grafana/tempo/modules/frontend/pipeline"
14+ "github.com/stretchr/testify/assert"
1415 "github.com/stretchr/testify/require"
1516)
1617
@@ -142,9 +143,10 @@ func TestErrorsPropagateUpstream(t *testing.T) {
142143 require .ErrorContains (t , err , "foo" )
143144 wg .Done ()
144145 }()
145-
146+ req := httptest . NewRequest ( "GET" , "http://example.com" , nil )
146147 _ = rb .add (& request {
147- err : errChan ,
148+ request : pipeline .NewHTTPRequest (req ),
149+ err : errChan ,
148150 })
149151 }
150152
@@ -165,11 +167,13 @@ func TestResponsesPropagateUpstream(t *testing.T) {
165167 wg .Add (1 )
166168 go func (expectedCode int32 ) {
167169 resp := <- responseChan
168- require .Equal (t , expectedCode , resp .StatusCode )
170+ assert .Equal (t , expectedCode , int32 ( resp .StatusCode ) )
169171 wg .Done ()
170172 }(i )
171173
174+ req := httptest .NewRequest ("GET" , "http://example.com" , nil )
172175 _ = rb .add (& request {
176+ request : pipeline .NewHTTPRequest (req ),
173177 response : responseChan ,
174178 })
175179 }
You can’t perform that action at this time.
0 commit comments