@@ -56,14 +56,14 @@ func TestConvertCountEnvelope(t *testing.T) {
56
56
assert .Equal (t , pcommon .NewTimestampFromTime (before ), dataPoint .StartTimestamp ())
57
57
assert .Equal (t , 10.0 , dataPoint .DoubleValue ())
58
58
59
- assertAttributes (t , dataPoint . Attributes (), map [string ]string {
59
+ assertAttributes (t , map [string ]string {
60
60
"org.cloudfoundry.source_id" : "uaa" ,
61
61
"org.cloudfoundry.origin" : "gorouter" ,
62
62
"org.cloudfoundry.deployment" : "cf" ,
63
63
"org.cloudfoundry.job" : "router" ,
64
64
"org.cloudfoundry.index" : "bc276108-8282-48a5-bae7-c009c4392246" ,
65
65
"org.cloudfoundry.ip" : "10.244.0.34" ,
66
- })
66
+ }, dataPoint . Attributes () )
67
67
}
68
68
69
69
func TestConvertGaugeEnvelope (t * testing.T ) {
@@ -132,7 +132,7 @@ func TestConvertGaugeEnvelope(t *testing.T) {
132
132
assert .Equal (t , pcommon .NewTimestampFromTime (now ), dataPoint .Timestamp ())
133
133
assert .Equal (t , pcommon .NewTimestampFromTime (before ), dataPoint .StartTimestamp ())
134
134
assert .Equal (t , 17046641.0 , dataPoint .DoubleValue ())
135
- assertAttributes (t , dataPoint .Attributes (), expectedAttributes )
135
+ assertAttributes (t , expectedAttributes , dataPoint .Attributes ())
136
136
137
137
metric = metricSlice .At (1 - memoryMetricPosition )
138
138
assert .Equal (t , "rep.disk" , metric .Name ())
@@ -142,7 +142,7 @@ func TestConvertGaugeEnvelope(t *testing.T) {
142
142
assert .Equal (t , pcommon .NewTimestampFromTime (now ), dataPoint .Timestamp ())
143
143
assert .Equal (t , pcommon .NewTimestampFromTime (before ), dataPoint .StartTimestamp ())
144
144
assert .Equal (t , 10231808.0 , dataPoint .DoubleValue ())
145
- assertAttributes (t , dataPoint .Attributes (), expectedAttributes )
145
+ assertAttributes (t , expectedAttributes , dataPoint .Attributes ())
146
146
}
147
147
148
148
func TestParseLogLine (t * testing.T ) {
@@ -324,7 +324,7 @@ func TestConvertLogsEnvelope(t *testing.T) {
324
324
})
325
325
}
326
326
327
- func assertAttributes (t * testing.T , attributes pcommon. Map , expected map [string ]string ) {
327
+ func assertAttributes (t * testing.T , expected map [string ]string , attributes pcommon. Map ) {
328
328
assert .Equal (t , len (expected ), attributes .Len ())
329
329
330
330
for key , expectedValue := range expected {
0 commit comments