Skip to content

Commit 875bc1b

Browse files
jrigueram1rp
andcommitted
[receiver/cloudfoundryreceiver] Fix argument order for assertAttributes function
Co-authored-by: Sam Clulow <[email protected]>
1 parent e289d45 commit 875bc1b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

receiver/cloudfoundryreceiver/converter_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ func TestConvertCountEnvelope(t *testing.T) {
5656
assert.Equal(t, pcommon.NewTimestampFromTime(before), dataPoint.StartTimestamp())
5757
assert.Equal(t, 10.0, dataPoint.DoubleValue())
5858

59-
assertAttributes(t, dataPoint.Attributes(), map[string]string{
59+
assertAttributes(t, map[string]string{
6060
"org.cloudfoundry.source_id": "uaa",
6161
"org.cloudfoundry.origin": "gorouter",
6262
"org.cloudfoundry.deployment": "cf",
6363
"org.cloudfoundry.job": "router",
6464
"org.cloudfoundry.index": "bc276108-8282-48a5-bae7-c009c4392246",
6565
"org.cloudfoundry.ip": "10.244.0.34",
66-
})
66+
}, dataPoint.Attributes())
6767
}
6868

6969
func TestConvertGaugeEnvelope(t *testing.T) {
@@ -132,7 +132,7 @@ func TestConvertGaugeEnvelope(t *testing.T) {
132132
assert.Equal(t, pcommon.NewTimestampFromTime(now), dataPoint.Timestamp())
133133
assert.Equal(t, pcommon.NewTimestampFromTime(before), dataPoint.StartTimestamp())
134134
assert.Equal(t, 17046641.0, dataPoint.DoubleValue())
135-
assertAttributes(t, dataPoint.Attributes(), expectedAttributes)
135+
assertAttributes(t, expectedAttributes, dataPoint.Attributes())
136136

137137
metric = metricSlice.At(1 - memoryMetricPosition)
138138
assert.Equal(t, "rep.disk", metric.Name())
@@ -142,7 +142,7 @@ func TestConvertGaugeEnvelope(t *testing.T) {
142142
assert.Equal(t, pcommon.NewTimestampFromTime(now), dataPoint.Timestamp())
143143
assert.Equal(t, pcommon.NewTimestampFromTime(before), dataPoint.StartTimestamp())
144144
assert.Equal(t, 10231808.0, dataPoint.DoubleValue())
145-
assertAttributes(t, dataPoint.Attributes(), expectedAttributes)
145+
assertAttributes(t, expectedAttributes, dataPoint.Attributes())
146146
}
147147

148148
func TestParseLogLine(t *testing.T) {
@@ -324,7 +324,7 @@ func TestConvertLogsEnvelope(t *testing.T) {
324324
})
325325
}
326326

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) {
328328
assert.Equal(t, len(expected), attributes.Len())
329329

330330
for key, expectedValue := range expected {

0 commit comments

Comments
 (0)