@@ -30,7 +30,7 @@ import (
30
30
31
31
"github.com/andybalholm/brotli"
32
32
"github.com/klauspost/compress/zstd"
33
- "github.com/mccutchen/go-httpbin/httpbin"
33
+ "github.com/mccutchen/go-httpbin/v2/ httpbin"
34
34
"github.com/sirupsen/logrus"
35
35
"github.com/stretchr/testify/assert"
36
36
"github.com/stretchr/testify/require"
@@ -274,7 +274,7 @@ func TestRequest(t *testing.T) {
274
274
http .Redirect (w , r , sr ("HTTPBIN_URL/post" ), http .StatusPermanentRedirect )
275
275
}))
276
276
_ , err := rt .RunString (sr (`
277
- var res = http.post("HTTPBIN_URL/post-redirect", "pesho", {redirects: 1});
277
+ var res = http.post("HTTPBIN_URL/post-redirect", "pesho", {redirects: 1, headers: {"Content-Type": "text"} });
278
278
279
279
if (res.status != 200) { throw new Error("wrong status: " + res.status) }
280
280
if (res.url != "HTTPBIN_URL/post") { throw new Error("incorrect URL: " + res.url) }
@@ -1076,11 +1076,11 @@ func TestRequest(t *testing.T) {
1076
1076
t .Run ("name/template" , func (t * testing.T ) {
1077
1077
_ , err := rt .RunString ("http.get(http.url`" + sr (`HTTPBIN_URL/anything/${1+1}` ) + "`);" )
1078
1078
assert .NoError (t , err )
1079
- // There's no /anything endpoint in the go-httpbin library we're using, hence the 404,
1079
+ // There's no /anythingwrong endpoint in the go-httpbin library we're using, hence the 404,
1080
1080
// but it doesn't matter for this test.
1081
1081
//
1082
1082
// Setting name will overwrite both name and url tags
1083
- assertRequestMetricsEmitted (t , metrics .GetBufferedSamples (samples ), "GET" , sr ("HTTPBIN_URL/anything /${}" ), 404 , "" )
1083
+ assertRequestMetricsEmitted (t , metrics .GetBufferedSamples (samples ), "GET" , sr ("HTTPBIN_URL/anythingwrong /${}" ), 404 , "" )
1084
1084
})
1085
1085
1086
1086
t .Run ("object" , func (t * testing.T ) {
0 commit comments