@@ -44,23 +44,23 @@ func TestIntegration(t *testing.T) {
44
44
handler .ServeHTTP (w , r )
45
45
46
46
// check request log
47
- var httpRequestLog HttpRequestLog
47
+ var httpRequestLog HTTPRequestLog
48
48
err := json .Unmarshal (requestLogOut .Bytes (), & httpRequestLog )
49
49
if err != nil {
50
50
t .Fatal (err )
51
51
}
52
52
53
53
opts := []cmp.Option {
54
- cmpopts .IgnoreFields (HttpRequestLog {}, "Time" , "Trace" ),
55
- cmpopts .IgnoreFields (HttpRequest {}, "RemoteIp" , "ServerIp" , "Latency" ),
54
+ cmpopts .IgnoreFields (HTTPRequestLog {}, "Time" , "Trace" ),
55
+ cmpopts .IgnoreFields (HTTPRequest {}, "RemoteIp" , "ServerIp" , "Latency" ),
56
56
}
57
- expected := HttpRequestLog {
57
+ expected := HTTPRequestLog {
58
58
Severity : "ERROR" ,
59
59
AdditionalData : AdditionalData {
60
60
"service" : "foo" ,
61
61
"version" : 1.0 ,
62
62
},
63
- HttpRequest : HttpRequest {
63
+ HTTPRequest : HTTPRequest {
64
64
RequestMethod : "GET" ,
65
65
RequestUrl : "/foo?bar=baz" ,
66
66
RequestSize : "0" ,
@@ -79,8 +79,8 @@ func TestIntegration(t *testing.T) {
79
79
t .Errorf ("diff: %s" , cmp .Diff (httpRequestLog , expected , opts ... ))
80
80
}
81
81
82
- if ! strings .HasSuffix (httpRequestLog .HttpRequest .Latency , "s" ) {
83
- t .Errorf ("invalid latency: %s" , httpRequestLog .HttpRequest .Latency )
82
+ if ! strings .HasSuffix (httpRequestLog .HTTPRequest .Latency , "s" ) {
83
+ t .Errorf ("invalid latency: %s" , httpRequestLog .HTTPRequest .Latency )
84
84
}
85
85
86
86
// check context log
@@ -141,20 +141,20 @@ func TestNoContextLog(t *testing.T) {
141
141
handler .ServeHTTP (w , r )
142
142
143
143
// check request log
144
- var httpRequestLog HttpRequestLog
144
+ var httpRequestLog HTTPRequestLog
145
145
err := json .Unmarshal (requestLogOut .Bytes (), & httpRequestLog )
146
146
if err != nil {
147
147
t .Fatal (err )
148
148
}
149
149
150
150
opts := []cmp.Option {
151
- cmpopts .IgnoreFields (HttpRequestLog {}, "Time" , "Trace" ),
152
- cmpopts .IgnoreFields (HttpRequest {}, "RemoteIp" , "ServerIp" , "Latency" ),
151
+ cmpopts .IgnoreFields (HTTPRequestLog {}, "Time" , "Trace" ),
152
+ cmpopts .IgnoreFields (HTTPRequest {}, "RemoteIp" , "ServerIp" , "Latency" ),
153
153
}
154
- expected := HttpRequestLog {
154
+ expected := HTTPRequestLog {
155
155
Severity : "DEFAULT" ,
156
156
AdditionalData : nil ,
157
- HttpRequest : HttpRequest {
157
+ HTTPRequest : HTTPRequest {
158
158
RequestMethod : "GET" ,
159
159
RequestUrl : "/foo?bar=baz" ,
160
160
RequestSize : "0" ,
0 commit comments