File tree 1 file changed +2
-1
lines changed
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -286,6 +286,7 @@ func TestRequestLogger_allFields(t *testing.T) {
286
286
req .Header .Set ("User-Agent" , "curl/7.68.0" )
287
287
req .Header .Set (echo .HeaderContentLength , strconv .Itoa (int (reader .Size ())))
288
288
req .Header .Set (echo .HeaderContentType , echo .MIMEApplicationForm )
289
+ req .Header .Set (echo .HeaderXRealIP , "8.8.8.8" )
289
290
290
291
rec := httptest .NewRecorder ()
291
292
c := e .NewContext (req , rec )
@@ -297,7 +298,7 @@ func TestRequestLogger_allFields(t *testing.T) {
297
298
assert .NoError (t , err )
298
299
assert .Equal (t , 10 * time .Second , expect .Latency )
299
300
assert .Equal (t , "HTTP/1.1" , expect .Protocol )
300
- assert .Equal (t , "192.0.2.1 " , expect .RemoteIP )
301
+ assert .Equal (t , "8.8.8.8 " , expect .RemoteIP )
301
302
assert .Equal (t , "example.com" , expect .Host )
302
303
assert .Equal (t , http .MethodPost , expect .Method )
303
304
assert .Equal (t , "/test?lang=en&checked=1&checked=2" , expect .URI )
You can’t perform that action at this time.
0 commit comments