Skip to content

Commit c557bd6

Browse files
committed
test: Fix failing httptest
1 parent 45adafe commit c557bd6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

v3/newrelic/internal_set_web_response_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func TestSetWebResponseSuccess(t *testing.T) {
4242
txn := app.StartTransaction("hello")
4343
w := httptest.NewRecorder()
4444
rw := txn.SetWebResponse(w)
45-
rw.WriteHeader(123)
45+
rw.WriteHeader(200)
4646
hdr := rw.Header()
4747
hdr.Set("zip", "zap")
4848
body := "should not panic"
@@ -51,7 +51,7 @@ func TestSetWebResponseSuccess(t *testing.T) {
5151
t.Error(err, n)
5252
}
5353
txn.End()
54-
if w.Code != 123 {
54+
if w.Code != 200 {
5555
t.Error(w.Code)
5656
}
5757
if w.HeaderMap.Get("zip") != "zap" {
@@ -62,8 +62,8 @@ func TestSetWebResponseSuccess(t *testing.T) {
6262
}
6363
app.ExpectTxnEvents(t, []internal.WantEvent{{
6464
AgentAttributes: map[string]interface{}{
65-
"httpResponseCode": 123,
66-
"http.statusCode": 123,
65+
"httpResponseCode": 200,
66+
"http.statusCode": 200,
6767
},
6868
Intrinsics: map[string]interface{}{"name": "OtherTransaction/Go/hello"},
6969
}})

0 commit comments

Comments
 (0)